mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2006
Posts: 2
B
Bowl of petunias
OP Offline
Bowl of petunias
B
Joined: Oct 2006
Posts: 2
I'm new to this so I need a little(?) bit of help.
I right now have this working code:
Quote:
on *:text:!temp22:#:{
var %a = 1, %b = $lines(c:\test.m)
while %a <= %b {
var %bday = $read(c:\test.m,nt,%a)
msg $chan n: %bday
inc %a

}


Now I would like to get the file from the web.
change the $read(c:\test.m,nt,%a) to doing like this $read(http://www.1.com/data.php,nt,%a) is there a simple way to do this?
/Boris confused

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
you need to use sockets

/help /sockets

there is a good introduction to sockets here

Last edited by billythekid; 24/10/06 08:01 PM.

billythekid
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
There was a topic a few months back asking this same question, I'm sure you could adapt it to your needs. Have a look:

https://forums.mirc.com/s...p;Number=157666

Joined: Oct 2006
Posts: 2
B
Bowl of petunias
OP Offline
Bowl of petunias
B
Joined: Oct 2006
Posts: 2
thx for the help..
I now have found some more problems. If I want to print all the text after the header:
[11:36] <jakke_X1> HTTP/1.1 200 OK
[11:36] <jakke_X1> Date: Wed, 25 Oct 2006 09:36:37 GMT
[11:36] <jakke_X1> Server: Apache/2.0.55 (Unix)
[11:36] <jakke_X1> Last-Modified: Tue, 24 Oct 2006 18:11:10 GMT
[11:36] <jakke_X1> ETag: "4f3cd-1d-7eb5cb80"
[11:36] <jakke_X1> Accept-Ranges: bytes
[11:36] <jakke_X1> Content-Length: 29
[11:37] <jakke_X1> Connection: close
[11:37] <jakke_X1> Content-Type: text/plain; charset=ISO-8859-1
[11:37] <jakke_X1> -

Is there a good way to do this?


Link Copied to Clipboard