Jump to content
Sign in to follow this  
Dude

InetGet and Referer - easiest way ?

Recommended Posts

Dude

I use "InetGet" to get a Website.

What is the easiest way to set an referer with InetGet ?

Edited by Dude

Share this post


Link to post
Share on other sites
ptrex

@Dude

You don't necesarilly need to use InetGet

You can use the HTTP protocol level instructions to do a GET statement incl. a referer.

Const $nPORT = 80
Const $sIPADDRESS = "10.0.0.X" your local address

TCPStartUp()

$TCPSocket = TCPConnect($sIPADDRESS,$nPORT)

If $TCPSocket = -1 Then Exit

; Construct the TCP Get Message
    $cmd  = 'GET /Test.xml HTTP/1.1' & @CRLF
    $cmd &= 'HOST: 10.0.0.51:80' & @CRLF
    $cmd &= 'ACCEPT-LANGUAGE: en' & @CRLF
    $cmd &= 'CONTENT-TYPE: text/xml; charset=utf-8?' & @CRLF ; Here's the Referer
    $cmd &= 'Connection: close' & @CRLF
    $cmd &=  @CRLF
ConsoleWrite($cmd & @LF& @LF)
    
Sleep (1000)
TCPSend($TCPSocket, $cmd)

Regards

ptrex

Share this post


Link to post
Share on other sites
Dude

Ok, thanks. But where i have to write the http adresse, for example www.web.de/test.html and the referer www.xy.com ?

Share this post


Link to post
Share on other sites
ptrex

@Dude

Const $nPORT = 80
Const $sIPADDRESS = "10.0.0.X" ; your local address

TCPStartUp()

$TCPSocket = TCPConnect($sIPADDRESS,$nPORT)

If $TCPSocket = -1 Then Exit

; Construct the TCP Get Message
    $cmd  = 'GET /test.html HTTP/1.1' & @CRLF
    $cmd &= 'HOST: www.web.de:80' & @CRLF
    $cmd &= 'ACCEPT-LANGUAGE: en' & @CRLF
    $cmd &= 'Referer: www.xy.com' & @CRLF ; Here's the Referer
    $cmd &= 'Connection: close' & @CRLF
    $cmd &=  @CRLF
ConsoleWrite($cmd & @LF& @LF)
    
Sleep (1000)
TCPSend($TCPSocket, $cmd)

Something like this maybe.

More info : HTTP Protocol

regards

ptrex

Edited by ptrex

Share this post


Link to post
Share on other sites
Dude

Does not work :P

Const $nPORT = 80
Const $sIPADDRESS = "192.168.178.2"; your local address

TCPStartUp()

$TCPSocket = TCPConnect($sIPADDRESS,$nPORT)

If $TCPSocket = -1 Then Exit

; Construct the TCP Get Message
    $cmd  = 'GET /index3.php HTTP/1.1' & @CRLF
    $cmd &= 'HOST: thomasott.com:80' & @CRLF
    $cmd &= 'ACCEPT-LANGUAGE: en' & @CRLF
    $cmd &= 'Referer: http://www.anonym.to' & @CRLF; Here's the Referer
    $cmd &= 'Connection: close' & @CRLF
    $cmd &=  @CRLF
ConsoleWrite($cmd & @LF& @LF)
   
Sleep (1000)
TCPSend($TCPSocket, $cmd)
Edited by Dude

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  

×