Results 1 to 4 of 4

Thread: PHP script to name URL

  1. #1
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP script to name URL

    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

  2. #2
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Any ideas guys?

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    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.

    Edit:

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

    Last edited by traq; 06-24-2011 at 02:07 AM.

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Should be $_SERVER['HTTP_REFERER']
    Corrections to my coding/thoughts welcome.

  5. The Following User Says Thank You to bluewalrus For This Useful Post:

    traq (06-24-2011)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •