Jump to content

winHTTP read facebook page html after logging in


Recommended Posts

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 by El-Masry
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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...