Code archives/Networking/HTTPGet

This code has been declared by its author to be Public Domain code.

Download source code

HTTPGet by marksibly2001
This little bit of code grabs a 'page' from an http server.

Posted by CTC on the Blitz Basement!
www=OpenTCPStream( "www.yahoo.com",80 )
If Not www RuntimeError "Failed to connect"
WriteLine www,"GET / HTTP/1.1"
WriteLine www,"Host: www.yahoo.com"
WriteLine www,"User-Agent: BlitzBrowser"
WriteLine www,"Accept: */*"
WriteLine www,""
While Not Eof(www)
    Print "RECV: " + ReadLine(www)
Wend
CloseTCPStream www

Comments

Rck2005


This is a windowed version of the above code for better readability


Code Archives Forum