package require http
set myurl "http://www.google.com/"
set token [::http::geturl $myurl]
set content [::http::data $token]
::http::cleanup $content
# and extract stuff from $content
Ps: Place the "package require http" line outside your proc.
Once the game is over, the king and the pawn go back in the same box.
Lately, a lot of people seem to have a lot of fun by spamming virus .jpg or images.
I created a script that will use something similiar to the code above to extract the headers, and check if they are actually a JPG file.
It works fine, but it stops working with very large JPGs... any idea what might be causing this?
The best way to start learning is to start helping.
Hmm... not sure if it will work, but there is a way to pass additional headers to the geturl command. So you can use the http range header to get only the first few bytes if you want.