Sign in to follow this  
Followers 0
MRXTO09

HTTP Request GET with proxy don't work

6 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



Hi,
Welcome to the autoit forum :)

This >UDF may help you.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

thanks you now check if the problem persists

Share this post


Link to post
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") 

Share this post


Link to post
Share on other sites

i've resolved WHIT

$WINHTTP_ACCESS_TYPE_NAMED_PROXY = 3

Share this post


Link to post
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.

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  
Followers 0