mIRC Home    About    Download    Register    News    Help

Print Thread
#210873 27/03/09 03:46 PM
S
spermis
spermis
S
I cant figure out, how to get a content from webpage, because when I open it with sockets, all it gets is this:
Code:
Moved Permanently
The document has moved here.
Apache/2.2.11 (Debian) Server at ** Port 80

Could someone help me with this here? I think it has something to do with redirects.

#210875 27/03/09 07:08 PM
Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
That is a redirect. You need to follow the redirection and request the subsequent document as all browsers do.

argv0 #210877 27/03/09 10:16 PM
S
spermis
spermis
S
Originally Posted By: argv0
That is a redirect. You need to follow the redirection and request the subsequent document as all browsers do.
As i said, i know that it does redirect, but i cant understand how to do that.

#210878 27/03/09 10:24 PM
Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
The Location header contains the URL you should be sending your next request. Take that value and build a new request.

http://en.wikipedia.org/wiki/HTTP_302

Though Moved Permanently is actually 301, the method is the same.


Link Copied to Clipboard