Jump to content

HTTP Request GET with proxy don't work


Recommended Posts

CODE:

Func HTTP_GET_FUNC($urls, $proxy, $useragent_line, $referer_line, $Data)


$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("GET", $urls&"?"&$Data, False)
$oHTTP.SetRequestHeader("User-Agent", $useragent_line)
$oHTTP.SetRequestHeader("Connection", "close")
$oHTTP.SetRequestHeader("Keep-Alive", 5000)
$oHTTP.SetRequestHeader("Accept-Encoding", "gzip")
$oHTTP.SetRequestHeader("Accept-Charset", "ISO-8859-1,UTF-8;q=0.7,*;q=0.7")
$oHTTP.SetRequestHeader("Cache-Control", "no-cache")
$oHTTP.SetRequestHeader("Accept-Language", "de,en;q=0.7,en-us;q=0.3")
$oHTTP.SetRequestHeader("Referer", $referer_line)
$oHTTP.SetProxy(2, $proxy)


$oHTTP.SetTimeouts(30000,60000,30000,30000)


$oHTTP.Send()
EndFunc

ERROR:

The requested action with this object has failed.:
$oHTTP.Send()
$oHTTP.Send()^ ERROR

 WHY DON'T WORK WITH PROXY?

Edited by MRXTO09
Link to comment
Share on other sites

i've tried with 

Global $hOpen = _WinHttpOpen("Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314", $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "123.125.116.241:13669")

i don't have errors but with the proxy i'don't have results

with this i've results

Global $hOpen = _WinHttpOpen("Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314") 
Link to comment
Share on other sites

 

i've tried with 

Global $hOpen = _WinHttpOpen("Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314", $WINHTTP_ACCESS_TYPE_NAMED_PROXY, "123.125.116.241:13669")

i don't have errors but with the proxy i'don't have results

 

Sometimes proxies with those weird port numbers don't work.

I usually use proxies that are on the 3128, 3129, 443, 8x, 8xxx ports.

Sometimes they do works but it's not nearly as common as the ones on those ports.

Also, it depends on what the proxy supports, http/https, make sure you're setting the right flags for the request.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...