html - How to track users origin PHP by using example.com/index.php?ref=origin -
how track users origin in php , see people using ref= don't have idea how request works .
my code
$calling_url = mysql_real_escape_string($_server['http_referer']);
url:
http://example.com/index.php?ref=http://externalsite.com/page.html or
http://example.com/index.php?ref=http%3a%2f%2fexternalsite.com%2fpage.html
php:
$ref = mysql_real_escape_string(rawurldecode($_get["ref"])); // $ref "http://externalsite.com/page.html" in both cases
resources url tracking:
Comments
Post a Comment