Hello. How to download a file, in ex: http://somesite.some/somefile.html to the eggdrop dir. Later i want to extract some notes from it. But i asume learning how to download it wuold be a best start.. Thank you.
package require http
set token [::http::geturl http://foo.com/bar.html]
# save it to file
set f [open bar.html w]
fconfigure $f -translation binary
puts -nonewline $f [::http::data $token]
close $f
# or parse it
foreach line [split [::http::data $token] \n] {
# parse that line
}
::http::cleanup $token
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use
And i want to do a Half life server browser dcript. So i know the website witch gives information of specified servers. So i download html file to the eggdrop dir. Extract some info. And post it to the chan. Maybe there is some easyer way to do this? Maybe there is some scripts already done? I searched this tcl archive and found nothing. Then I googled a lot.. And still nothing...
learn to copy & paste text, no need to post pictures of text; and learn how to use http package (I somehow doubt you have any experience in scripting though...)
there are zillions of http scripts which do what you want to do; how did your search yield nothing is beyond me
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use