» Smart Phones, Web Design, Google or whatever
Using PHP to grab the Referer
You can use PHP to track how someone got to a specific page by grabbing the referring page, called the referer. Use this code to get that info:
<?php
$myReferer = $_SERVER['HTTP_REFERER'];
?>
NOTE: Watch the code above, depending upon my current CSS in my current theme the single quotes or even double quote may change to fancy quotes which will need to be edited if you cut-n-paste the code.
MORE info available on PHP.net’s $_SERVER manual page
| Print article | This entry was posted by admin on June 18, 2010 at 2:52 pm, and is filed under Web Design. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |