Friday, July 14, 2006

winsock- the future?

Went to the microsoft website to find out more about winsock, seems to be a pretty nifty command, it only needs two bits of information to connect to a remote host/computer, that is the I.P address of the computer and the port you want to connect to, I didn't know much about the ports but fortunately there was a tutorial located at http://www.freevbcode.com/ShowCode.asp?ID=3025 which included a list of ports associated with different transfer protocols, in this case I wanted to connect to a website and thus needed to connect to port 80. I've written the code for connecting to a website, however when I run it I have no idea whther it has actually connected, I'm hoping I can find some way of returning errors. I'm also having another problem - from what I can gather winsock works like this - the client connects to the server and sends a request or ping, the sever has been setup so that it waits for this request and sends back the appropiate data. This is cool if you're making an online game or a chat program, however I just want to mine data from websites, the website will not send data back, I'm not sure how I'm going to actually get hold of the data once connected without getting the server setup with the appropiate code.. I still think this may be possible so I'm going to carry on with winsock for a while, if not I shall try to pursue another method.

0 Comments:

Post a Comment

<< Home