Jump to content
Sign in to follow this  
Juvigy

Winhttp request Proxy issue

Recommended Posts

Hi Guys,

Here is a simple code:

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
    $oHttp.SetProxy(0) ; PRECONFIG = 0 (default), DIRECT = 1, PROXY = 2
    $oHTTP.Open("GET",$link,True)
    $oHTTP.Send()
    $oHTTP.SetTimeouts(30000, 30000, 30000, 30000)
    $oHTTP.WaitForResponse()
    $HTMLSource = $oHTTP.Responsetext

The problem is that it doesn't work all the times - i see that i get the proxy error most of the times (i am behind proxy) and "use automatic configuration script" is set. Something like http://autocache.domain.net/.

How can i make it work every time?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...