This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

redirection page

Old posts that have not been replied to for several years.
Locked
d
darkrad
Voice
Posts: 16
Joined: Wed Sep 10, 2003 6:33 pm

redirection page

Post by darkrad »

I have a problem with getting data from a redirection page :

set url "<a url that point to a redirection page>"
set http [ http::geturl $url ]
putlog "[ http::code $http]"
set html [ http::data $http ]
set fs [open "test.txt" w+]
puts $fs $html
close $fs

i get in logs : HTTP/1.1 302 Found
so this should be a redireciton page , but
if i look at test.txt file , it's empty :cry:
I looked at man , and found this (in "http" command seciton):

http
The HTTP status reply from the server. This value is returned by the ::http::code command. The format of this value is:
HTTP/1.0 code string
The code is a three-digit number defined in the HTTP standard. A code of 200 is OK. Codes beginning with 4 or 5 indicate errors. Codes beginning with 3 are redirection errors. In this case the Location meta-data specifies a new URL that contains the requested information.

now , how can i show that location meta info ? maybe i can get the redirection url from there .

thx for the help
Locked