mIRC Home    About    Download    Register    News    Help

Print Thread
#34476 06/07/03 06:36 PM
B
BORR
BORR
B
How can I store all the text on a web page in %webpage?

So when I start the script, mirc will automaticly open several web pages, copy all the text on those web pages and store that text in %webpage.

Is this possible?

T
theRat
theRat
T
it's possible... If the sites are small enough, otherwise you'll get line too long error pretty soon...

P
pheonix
pheonix
P
heres an example.

alias google.search {
.set %search $1-
sockopen google google.com 80
sockmark /search?hl=en&ie=UTF-8&oe=UTF-8&q= $+ %search
}
on 1:SOCKOPEN:GOOGLE:{
sockwrite -n $sockname GET $sock($sockname).mark HTTP/1.1
sockwrite -n $sockname accept: */*
sockwrite -n $sockname $crlf
}
on 1:SOCKREAD:GOOGLE:{
if ($sockerr > 0) { return }
sockread %s
.set %data %data $+ %s
}

Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
just an fyi, you may change
.set %search $1-
to
.set %search $replace($1-, $chr(32), +)

>:D

P
pheonix
pheonix
P
completely forgot about that grin

B
BORR
BORR
B
thnx for the help, I got it working now laugh

P
pheonix
pheonix
P
np smile


Link Copied to Clipboard