mIRC Home    About    Download    Register    News    Help

Print Thread
#136998 06/12/05 08:23 PM
Joined: Jul 2005
Posts: 51
P
Babel fish
OP Offline
Babel fish
P
Joined: Jul 2005
Posts: 51
any script that retrieves the weather from weather.yahoo.com ?
(for example when I type /weather beirut, lebanon )

I will parse the html, I just want the way to post via sockets..

Thanks smile


chadchoud @ DALnet
#136999 06/12/05 08:29 PM
Joined: Oct 2005
Posts: 54
B
Babel fish
Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
The only way I can think of is using $read, and $mid... frown


Chat NSN
My Server: sleepystickman.ircxpro.com
#137000 07/12/05 01:54 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Information read from a website is done on a line by line basis, with each line ending in a CRLF code. A line might also be terminated early if the line is longer than what a variable will hold...approximtely 900 characters.

Once you have read a line into a variable (via $sockread), then you can work with it as you wish.

I haven't done much with sockets, myself, but if you will clarify just what it is you're wanting, I'll be happy to assist in any way I can.

If you're wondering how you send information to the site, that is done using /sockwrite.

General help on sockets available via /help sockets


Link Copied to Clipboard