egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

redirection page

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
darkrad
Voice


Joined: 10 Sep 2003
Posts: 16

PostPosted: Fri Sep 12, 2003 5:55 am    Post subject: redirection page Reply with quote

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 Crying or Very sad
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
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber