mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2004
Posts: 59
S
synth7 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jul 2004
Posts: 59
I've read about sockets as much as I could but it's simply not clicking with me. Any help or a point in the right direction would be very helpful, it might help so see some actual code that does something similiar so I can figure out how to do this

What i want to do with a script is to go to this page - http://www.wrfx.com/iplaylist/ - and get the current song title and artist into a channel.

any info is appreciated, thanks



Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
If you search the forum for "sockopen", you'll find various examples of how to work with sockets.

Basically, you need to open the socket using /sockopen. Then, you need an on SOCKOPEN event. These usually look the same no matter what site you're working with other than the GET line and the HOST line. Finally, you need the on SOCKREAD event that will parse your text. Remember that text is read 1 line at a time from the HTML code, so you need to check each line for the text you're trying to get and, when you find it, do whatever you want to with it.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard