mIRC Homepage

Socket using

Posted By: spermis

Socket using - 27/03/09 03:46 PM

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.
Posted By: argv0

Re: Socket using - 27/03/09 07:08 PM

That is a redirect. You need to follow the redirection and request the subsequent document as all browsers do.
Posted By: spermis

Re: Socket using - 27/03/09 10:16 PM

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.
Posted By: argv0

Re: Socket using - 27/03/09 10:24 PM

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.
© 2021 mIRC Discussion Forums