RE: [PHP] Referring Page
[snip] I am trying to set up a script that will do different things based on the reffering page, without having to include the information in the URL. Does PHP have a built in variable or function that would tell the rest of the script what page the user came from? Any help is much appreciated. [/snip] http://ca3.php.net/manual/en/reserved.variables.php#reserved.variables.s erver But be warned, they're not that reliable as some firewalls block/muck with them, and they can also be easily spoofed. Cheers, Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referring Page
$referrer = $_SERVER['REFFERER']; something like that... then you can do something like if ($referrer == 'whatever') $sdaf = whatever; I usually do something like if (strpos($referrer,'pagename.php')) //execute code I am trying to set up a script that will do different things based on the reffering page, without having to include the information in the URL. Does PHP have a built in variable or function that would tell the rest of the script what page the user came from? Any help is much appreciated. Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referring Page
Yes, write a script with: ?php phpinfo(); ? and you will find all the wonderous variables at your disposal... -B - Original Message - From: Ben [EMAIL PROTECTED] Date: Thursday, October 14, 2004 3:37 pm Subject: [PHP] Referring Page I am trying to set up a script that will do different things based on the reffering page, without having to include the information in the URL. Does PHP have a built in variable or function that would tell the rest of the script what page the user came from? Any help is much appreciated. Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referring Page
I am trying to set up a script that will do different things based on the reffering page, without having to include the information in the URL. Does PHP have a built in variable or function that would tell the rest of the script what page the user came from? Any help is much appreciated. there is $_SERVER['HTTP_REFERER'] but it is unreliable -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referring Page
Ben wrote: I am trying to set up a script that will do different things based on the reffering page, without having to include the information in the URL. Does PHP have a built in variable or function that would tell the rest of the script what page the user came from? Any help is much appreciated. Ben Ah, in the manual http://us2.php.net/reserved.variables Don't rely on it. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referring Page
Jonathan Villa wrote: $referrer = $_SERVER['REFFERER']; Will return nothing. $_SERVER['HTTP_REFERER'] -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referring Page
I am trying to set up a script that will do different things based on the reffering page, without having to include the information in the URL. Does PHP have a built in variable or function that would tell the rest of the script what page the user came from? Any help is much appreciated. there is $_SERVER['HTTP_REFERER'] but it is unreliable Can I ask why? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referring Page
Can't be put any more plainly than that, thanks... Ben wrote: I am trying to set up a script that will do different things based on the reffering page, without having to include the information in the URL. Does PHP have a built in variable or function that would tell the rest of the script what page the user came from? Any help is much appreciated. Ben Ah, in the manual http://us2.php.net/reserved.variables Don't rely on it. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referring Page
*typo Jonathan Villa wrote: $referrer = $_SERVER['REFFERER']; Will return nothing. $_SERVER['HTTP_REFERER'] -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Referring Page
Thanks all. That did it perfectly. -Original Message- From: Matt M. [mailto:[EMAIL PROTECTED] Sent: Thursday, October 14, 2004 2:21 PM To: Ben Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Referring Page I am trying to set up a script that will do different things based on the reffering page, without having to include the information in the URL. Does PHP have a built in variable or function that would tell the rest of the script what page the user came from? Any help is much appreciated. there is $_SERVER['HTTP_REFERER'] but it is unreliable -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referring Page
On Thu, 14 Oct 2004 16:47:08 -0400, John Nichel [EMAIL PROTECTED] wrote: Will return nothing. $_SERVER['HTTP_REFERER'] Just an FYI.. Some versions of IE do not report this info. And some of the newer home firewall software applications scrub it out under the guise of privacy, Norton Personal Firewall for example. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referring Page
On Friday 15 October 2004 05:03, Jonathan Villa wrote: there is $_SERVER['HTTP_REFERER'] but it is unreliable Can I ask why? archives. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* A shapely CATHOLIC SCHOOLGIRL is FIDGETING inside my costume.. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referring Page
I am trying to set up a script that will do different things based on the reffering page, without having to include the information in the URL. Does PHP have a built in variable or function that would tell the rest of the script what page the user came from? Any help is much appreciated. there is $_SERVER['HTTP_REFERER'] but it is unreliable Can I ask why? not sure if you are asking me, but like someone already said in this thread But be warned, they're not that reliable as some firewalls block/muck with them, and they can also be easily spoofed. I also even turn them off when I am using mozilla/firefox. Just not a reliable variable -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php