Log in

View Full Version : PHP script to name URL



Ray Jonnes
06-14-2011, 05:02 PM
Guys, I need a script to NAME an URL - for example when some person came to my site from "www . Walmart . com/products/something.html" than I got a popup "Greetings WALMART shopper" where WALMART is autowritten by this script missing /product/... and so on. Just a domain name between dots?

Is any ideas people? Please help :confused:

Ray Jonnes
06-23-2011, 02:11 PM
Any ideas guys?

traq
06-23-2011, 02:17 PM
check $_SERVER['HTTP_REFERER']. It's set by the browser, though, so it is sometimes missing, incorrect, or falsified. For something like this, however, that might not be too important.



Corrected $_SESSION to $_SERVER. ( Whoops! ) Thanks, bluewalrus!

bluewalrus
06-23-2011, 02:58 PM
Should be $_SERVER['HTTP_REFERER']