No insult intended, but judging from what I have seen in your posts so far, you are just starting out with this scripting stuff. That means you need to stay as far away from sockets as you can. Sockets require you to understand the HTTP protocol if you wanna connect to a website, the IRC protocol if you wanna connect to a IRC server, etc. You need to be good with the basic stuff like loops/variables/identifiers/and so on. Sockets are not for a beginner.