using fsockopen to handle redirections
am 23.12.2005 11:04:16 von Yemi Obembe
------=_Part_9932_14403492.1135332256591
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
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 =3D fsockopen(www.ex1.com, 80)
.....
to connect to the site, anyway i can know if there is a redirection to
another url?
------=_Part_9932_14403492.1135332256591--
Re: using fsockopen to handle redirections
am 23.12.2005 19:05:01 von Micah Stevens
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?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php