Jump to content
Sign in to follow this  
incepator

IE referrer

Recommended Posts

Hi guys.
I have a question if you can help ...
I can set the referer to a page, it seems that is not so simple.

IE functions do not offer this option, but I managed to set a referer using functions from "WinHttp.au3"

I need to modify this script so that it appears in the IE page, this referer.

#include <WinHttp.au3>
#include<Ie.au3>


$hw_open = _WinHttpOpen("WinHTTP Example")
$hw_connect = _WinHttpConnect($hw_open, "whatismyreferer.com")
$h_openRequest = _WinHttpOpenRequest($hw_connect, Default, Default, Default, "newwebsite.com")

_WinHttpSendRequest($h_openRequest)
_WinHttpReceiveResponse($h_openRequest)

If _WinHttpQueryDataAvailable($h_openRequest) Then
    $header = _WinHttpReadData($h_openRequest)
EndIf

_WinHttpCloseHandle($h_openRequest)
_WinHttpCloseHandle($hw_connect)
_WinHttpCloseHandle($hw_open)

MsgBox(0, "", $header)
Local $oIE = _IECreate("whatismyreferer.com")

Share this post


Link to post
Share on other sites

I see you can do that for user agent too.

Pretty cool, and I'm sure that in the past I've had issues automating things because there was no referer using _IENavigate().

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  

×
×
  • Create New...