mIRC Home    About    Download    Register    News    Help

Print Thread
#34476 06/07/03 06:36 PM
Joined: Mar 2003
Posts: 41
B
BORR Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Mar 2003
Posts: 41
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?

Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
it's possible... If the sites are small enough, otherwise you'll get line too long error pretty soon...


Code:
//if ( khaled isgod ) echo yes | else echo no
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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
}


new username: tidy_trax
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
just an fyi, you may change
.set %search $1-
to
.set %search $replace($1-, $chr(32), +)

>:D


-KingTomato
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
completely forgot about that grin


new username: tidy_trax
Joined: Mar 2003
Posts: 41
B
BORR Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Mar 2003
Posts: 41
thnx for the help, I got it working now laugh

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
np smile


new username: tidy_trax

Link Copied to Clipboard