Re: using fsockopen to handle redirections

From: Date: Fri, 23 Dec 2005 18:05:01 +0000
Subject: Re: using fsockopen to handle redirections
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-40914@lists.php.net to get a copy of this message
I suppose you could, but it seems a poor way, just use the header tag instead: if ($redir_needed) { header('Location: http://www.example.com'); writelog("user redirected"); } On Friday 23 December 2005 2:04 am, Yemi Obembe wrote: > Any way i can use fsockopen to detect url redirections? for example if ds: > www.ex1.com redirects to www.ex2.com and i'm using: > > $fp = fsockopen(www.ex1.com, 80) > .... > > to connect to the site, anyway i can know if there is a redirection to > another url?

« previous php.db (#40914) next »