Re: Redirect with referer info
| From: | Joe Wollard | Date: | Sat, 30 Jul 2005 15:50:49 +0000 |
| Subject: | Re: Redirect with referer info | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-219673@lists.php.net to get a copy of this message | ||
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