سؤال

I tried to set the usergent using

Inet1.Execute , "GET", "Referer: yahoo.com" & vbCrLf & "Content-Type: application/x-www-form-urlencoded" & vbCrLf & "Accept-Language: en-us" & vbCrLf & "Accept-Encoding: gzip, deflate" & vbCrLf & "User-Agent: Mozilla/4.0 (compatiable; MSIE 6.0; Windows NT 5.1; yie6)"

but it didnt't work :(

Any solution?

هل كانت مفيدة؟

المحلول

The user agent is not something that you can set. You are using the Microsoft Internet Transfer control so the user agent will be "Microsoft URL Control - (some version number)".

نصائح أخرى

Actually, you can set the User-Agent for the Inet control. The requester is on the right track - but instead of the 'data' arg use the 'requestHeaders' arg.

'WebBrowser1.Navigate "yoursitegoeshere.com/", , , , "User-Agent: User Agent Goes Here"

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top