{2/3} [b]Doing this from blitz[/b] Go back to the GET section where we outlined how a browser gets a page, well we are going to do exactly the same! The command to connect to a server using TCP is [i]OpenTCPStream("url", port)[/i] [code]tcp_stream = OpenTCPStream("www.google.co.uk",80)[/code] This creates a 'stream', similar to how blitz handles reading from/writing to files, except over the internet :) In fact we can use the same commands to get data as we would do from a local file. Next to make the request we use the [i]WriteLine stream, data[/i]. Don't forget to send a blank line to tell the server you are done. [code]WriteLine tcp_stream,"GET http://www.google.co.uk HTTP/1.0" WriteLine tcp_stream,""[/code] So now the server will reply. We need to set up a loop and read all the data. [i]ReadLine$(stream)[/i] will get the next line of data and [i]Eof(stream)[/i] (End-Of-File) tells us when we are done to break the loop. [code]While Not Eof(tcp_stream) DebugLog ReadLine$(tcp_stream) Wend[/code] ReadLine is suitable for text data, like the headers and web pages, but you might want to use ReadByte for binary data, like images. Now we are done, close the connection. If we had many files to get, we could actually make another request without closing, but for that we need HTTP/1.1 [code]CloseTCPStream tcp_stream[/code] This post is from -- http://socoder.net/index.php?topic=1856