El-Masry Posted August 4, 2019 Posted August 4, 2019 (edited) Hello, I am new to winHttp functions I want to log in facebook then read the html of my profile page this code that @trancexx wrote is working,but I want to login first to see my facebook profile data On 9/29/2015 at 5:49 AM, trancexx said: Nothing is blocked. What you see is javascript redirection. Resourceful programmer would do this: #include "WinHttp.au3" ; Initialize and get session handle $hOpen = _WinHttpOpen() ; Get connection handle $hConnect = _WinHttpConnect($hOpen, "fastshop.com.br") ; Request $hRequest = _WinHttpSimpleSendRequest($hConnect, Default, "/loja") ; Simple-read... $sRead = _WinHttpSimpleReadData($hRequest) MsgBox(64, "Returned (first 1100 characters)", StringLeft($sRead, 1100) & "...") ; Close handles _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) thanks in advance Edited August 4, 2019 by El-Masry khonghanh 1
Seminko Posted August 4, 2019 Posted August 4, 2019 I'm fairly new to web requests and I'm not of FB for some time, but I don't think you will achieve this with WinHttp. You might be able to do it using Curl with saving and passing cookies etc. However, I would advise using the IE UDF --> https://www.autoitscript.com/autoit3/docs/libfunctions/_IECreate.htm and other IE fuctions. You can make the IE window invisible so that the script "runs in the background", and it will be heck of a lot easier.
El-Masry Posted August 4, 2019 Author Posted August 4, 2019 1 minute ago, Seminko said: I'm fairly new to web requests and I'm not of FB for some time, but I don't think you will achieve this with WinHttp. You might be able to do it using Curl with saving and passing cookies etc. However, I would advise using the IE UDF --> https://www.autoitscript.com/autoit3/docs/libfunctions/_IECreate.htm and other IE fuctions. You can make the IE window invisible so that the script "runs in the background", and it will be heck of a lot easier. I can make this by IE functions ,but it is too slow
Danp2 Posted August 4, 2019 Posted August 4, 2019 Use the function _WinHttpSimpleFormFill to submit your login information and capture the returned data in a variable. This data should be the html of the initial page post login. El-Masry 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now