Re: Redirect with referer info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To obtain a certain portion of the referring url you might look at parse_url();
See http://us3.php.net/manual/en/function.parse-url.php

- or -

If you want to bounce the user right back to the previous page including get variables you could just use this snippet.

<?php
$referrer = $_SERVER['HTTP_REFERER'];
header("Location: " . $referrer);
exit;
?>


On Jul 30, 2005, at 9:36 AM, Dotan Cohen wrote:

Hi list,
I need to redirerect a page, and send the referer information along
with the redirect. I have tried:
header("Location: $url");
and
print"<html><head><meta http-equiv='refresh' content='0; URL=$url'
/></head></html>";

Both of them redirect as expected, but the browser (Firefox and Opera)
do not send referer information along with the request. As this is for
link affiliates, I need that referer info sent with the request. How
to do that? Thanks.

Dotan Cohen
Song Lirics http://song-lirics.com/sl/artists.php/b Song Lirics

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux