Show Users How they got to your site -
-----------------------------------------------------
<?php
$referer = $_SERVER['HTTP_REFERER'];
echo "You reached this site via " . $referer;
?>
--------------------------------------------------------
Send users to a certain page depending on where they come from to your site.
The script below would send visitors who found your site through Facebook to one page, while all others would be redirected to another.
-----------------------------------------------------
<?php
$referer = $_SERVER['HTTP_REFERER'];
echo "You reached this site via " . $referer;
?>
--------------------------------------------------------
Send users to a certain page depending on where they come from to your site.
The script below would send visitors who found your site through Facebook to one page, while all others would be redirected to another.
--------------------------------------------------------------------
<?php
if (strlen(strstr($_SERVER["HTTP_REFERER"],"facebook"))>0) {
header ('Location: http://' . $_SERVER['HTTP_HOST'] . '/from_facebook.html');
} else {
header ('Location: http://' . $_SERVER['HTTP_HOST'] . '/not_from_facebook.html');
}
?>
----------------------------------------------------------------------------------- 27 October 2010Comment
that may not work as intended!