Jump to content

quarqo

Active Members
  • Posts

    21
  • Joined

  • Last visited

quarqo's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thank you for the reply. I've already tried that. It returns all the response headers from the redirected website but nothing about the location url.
  2. Hello autoit community! I am struggling again with a (probably noobish) issue and I am seeking for you help. Basically here is what I am trying to do: I am using the WinHTTP.au3 UDF to make some requests to a website that redirect to another webpage. Here come the question, how can I get the url of the website that the request lands after redirection? I am using a simple code: ; Initialize and get session handle Global $hOpen = _WinHttpOpen() ; Get connection handle Global $hConnect = _WinHttpConnect($hOpen, $initialurl) ; Make a request Global $hRequest = _WinHttpSimpleSendRequest($hConnect, Default, "/") ;Here the request follow the redirection and land on a different webpage ; Close handles _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) I am really looking forward to see if there is any solution. Quarqo.
  3. Thank you soo much for your replies guys! Yes the problem was that my window was not active, but I don't want to activate it..hm..
  4. Hello! I recently cam across a weird problem related to "controlsend" and "controlclick" functions. So, if I use for example: ControlClick("Window Title", "", "", "left", 1, 116, 78) This line of code is working perfectly! Anyway, if I get the handle of the window and insert it into the above code, it stop working! $hwnd = WinGetHandle ( "Window Title" ) ControlClick($hwnd, "", "", "left", 1, 116, 78) ;not working anymore The controlclick/send functions shouldn't work with both, Window Title or Window Handle? If anyone could help me out, I would appreciate.
  5. Hey! Is there any way to set the image path of the GUICTRLCreatePic with GUICTRLSetData ? It is not working for me. Ofc other ways can help. Thanks !
  6. Hey ! I am looking for an way to connect on an webserver database with AutoIT. I have tryed to use both and but I'm still getting same error on connecting to database. "lost connection to mysql server at 'reading initial communication packet' system error 0". Does anyone know what is wrong, why this error appear ? Any help is gladly appreciate, thank you !
  7. Thank you but still not working ! The only website i can access using your script is whatismyipaddress.com and yes it says that i'm using an proxy. The problem is that i can't access any other websites, like google, facebook, etc. Im still getting this error " Cache Access Denied. Sorry, you are not currently allowed to request http://www.facebook.com/ from this cache until you have authenticated yourself." ( same on any other website). What cause this error ? Thanks !
  8. Thank you for help, i really appreciate ! But there is any way to do this with WinHTTP UDF ?
  9. Hey ! I am trying to use some private proxies on WInHTTP requests and I keep getting an error like "Sorry, you are not currently allowed to request http://www.ip-adress.com from this cache until you have authenticated yourself." . I use this code: #include<WinHTTP.au3> #include<WinApi.au3> Global Const $tagWINHTTP_PROXY_INFO = "DWORD dwAccessType;ptr lpszProxy;ptr lpszProxyBypass;" Func _WinHttpProxyInfoCreate($dwAccessType, $sProxy, $sProxyBypass) Local $tWINHTTP_PROXY_INFO[2] = [DllStructCreate($tagWINHTTP_PROXY_INFO), DllStructCreate('wchar proxychars[' & StringLen($sProxy)+1 & ']; wchar proxybypasschars[' & StringLen($sProxyBypass)+1 & ']')] DllStructSetData($tWINHTTP_PROXY_INFO[0], "dwAccessType", $dwAccessType) If StringLen($sProxy) Then DllStructSetData($tWINHTTP_PROXY_INFO[0], "lpszProxy", DllStructGetPtr($tWINHTTP_PROXY_INFO[1], 'proxychars')) If StringLen($sProxyByPass) Then DllStructSetData($tWINHTTP_PROXY_INFO[0], "lpszProxyBypass", DllStructGetPtr($tWINHTTP_PROXY_INFO[1], 'proxybypasschars')) DllStructSetData($tWINHTTP_PROXY_INFO[1], "proxychars", $sProxy) DllStructSetData($tWINHTTP_PROXY_INFO[1], "proxybypasschars", $sProxyBypass) Return $tWINHTTP_PROXY_INFO EndFunc $hInternet = _WinHttpOpen() $hConnect = _WinHttpConnect($hInternet, "ip-adress.com") $standard = _WinHttpSimpleRequest($hConnect, "GET", "/get_html.php") _WinHttpCloseHandle($hConnect) $tProxyInfo = _WinHttpProxyInfoCreate($WINHTTP_ACCESS_TYPE_NAMED_PROXY, "xx.xxx.xx.xx:xxxxx", "") _WinHttpSetOption($hInternet, $WINHTTP_OPTION_PROXY, $tProxyInfo[0]) $hConnect = _WinHttpConnect($hInternet, "ip-adress.com") _WinHttpSetOption($hInternet, $WINHTTP_OPTION_PROXY_USERNAME, "user") _WinHttpSetOption($hInternet, $WINHTTP_OPTION_PROXY_PASSWORD, "pass") $mit_proxy = "" $hRequest = _WinHttpOpenRequest($hConnect, "GET") If $hRequest Then ; Set password here _WinHttpSetCredentials($hRequest, $WINHTTP_AUTH_TARGET_PROXY, $WINHTTP_AUTH_SCHEME_BASIC, "user", "pass") If _WinHttpSendRequest($hRequest) Then _WinHttpReceiveResponse($hRequest) $mit_proxy = _WinHttpSimpleReadData($hRequest) msgbox(0,"",$mit_proxy) EndIf _WinHttpCloseHandle($hRequest) EndIf _WinHttpCloseHandle($hConnect) I'm using an working private proxy. Can anyone help me to get this working ? Thank you, Luke !
  10. Hey! Can anyone teach me how to select items from this types of menus with controlclick? i can click of them but i don't know how to select items ... Thanks. http://imageshack.us/photo/my-images/27/...eshack.us/photo/my-images/27/i
  11. Thank you for reply! But i only need to do this through winhttp.
  12. Hey! It is possible to click on an javascript button (like "Facebook like button", "Google plus button"...) through winhttp ? It doesn't seem to work for me. Any help will be appreciated.
  13. I have a problem using ControlSend function. I did an little bot so I'm trying to send an text to it. Everything works good but if i'm trying to minimize the window it will always pop-up and make the window active when the controlsend function run. How can i make it run in background or minimized, i want to do other stuffs untill the bot is finish its job. Can anyone help me ? Thanks.
  14. Is there any way to login on twitter with winhttp ? I tryed but no luck..
×
×
  • Create New...