mIRC Home    About    Download    Register    News    Help

Print Thread
help not very good with sockets #1957 15/12/02 09:53 PM
Joined: Dec 2002
Posts: 22
S
Sl1pkn0t Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 22
Hey guys i was wondeing i have this file xdcc_list.asp what i want to do is from mIRC i coded a script that makes a xdcc listing from a channel and output it to asp but what i want to do is after it output it is to upload it to my website is there a way through sockets that i could upload xdcc_list.asp to www.brinkster.com ?thanks for the help in advance

Re: help not very good with sockets #1958 16/12/02 02:19 AM
Joined: Dec 2002
Posts: 103
Pasmal Offline
Vogon poet
Offline
Vogon poet
Joined: Dec 2002
Posts: 103
Sure, you need to be familiar with the HTTP protocol (brief summary) as you'll be wanting to submit some sort of HTTP request, either by POST method or GET method. GET is easier but can't fit as much information per request, while POST is good for heaps of info.

GET is easier for me to explain, so I'll use it:

let's say xdcc_list.asp takes some params, channel and data, so you might be doing something like http://....../xdcc_list.asp?channel=BLAH&data=MORE_BLAH

Translate to sockets / HTTP:

Code:
on *:SOCKOPEN:wwwsocket: {
sockwrite -n $sockname GET /......./xdcc_list.asp?channel=BLAH&data=MORE_BLAH
sockwrite -n $sockname Host: www.brinkster.com
sockwrite -n $sockname $crlf
}


See http://www.hdesk.org/documents/socks.php for more info on sockets.

HTH smile