find referer website information by HTTP_REFERER server variable in php
how-to-find-referer-website-in-php.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>find referer website information by HTTP_REFERER server variable in php</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Md Iqbal Hosan">
<meta name="title" content="find referer website information by HTTP_REFERER server variable in php">
<meta name="keywords" content="php, example, code, array, function, money_format, string, HTTP_REFERER, server variable, referer website">
<meta name="description" content="find referer website information by HTTP_REFERER server variable in php">
<style>
h2, h4{background:#eee; color:#000102;}
h2{ padding:3px; margin:3px; font-size:21px;}
h4{ padding:2px; margin:2px; font-size:17px;}
p{padding:2px; margin:2px; color:#0099cc;}
body{ background:#FFFFaa;}
</style>
</head>
<body>
<h2>find referer website information by HTTP_REFERER server variable in php</h2>
<pre>
<?php
/*
-------------------------------------------------------------------
we want to find the website that refered visitor to my site
we can do this by using HTTP_REFERER server variable in php
-------------------------------------------------------------------
*/
echo "<h4>output of referer website information by using HTTP_REFERER server variable</h4>";
echo $_SERVER['HTTP_REFERER'];
/*
---------------------------------------------------------------------------------
in professional programming it's rapidly used to get the referer website
information. it will show more meaningful information in production environment.
---------------------------------------------------------------------------------
*/
?>
</pre>
</body>
</html>

No comments:
Post a Comment
leave your comments here..