Forum Moderators: coopster
I'd like to get the actual url typed in the browser - not the $_SERVER['REQUEST_URI'].
One of my pages is being picked up in google as a duplicate when it is in fact the original. The infringing site is showing 'You searched for these terms'
and then shows my page below (highlighing the search terms), requested live from my server.
The url indexed by google shows as www.theirsite.com:2007/sthl?st=Weight+Loss+Help&url=http%3A%2F%2Fwww.mysite.com
$_SERVER['REQUEST_URI'] returns 'www.mysite.com' and not 'www.theirsite.com'
I want get the original url from the browser so I can replace my original page with a 'View this page here' message if the originating url is not from mysite.com
Is it possible using PHP only or am I right in thinking it is only possible using javascript?
<?
$url = $_SERVER['SERVER_NAME'];
$page = $_SERVER['PHP_SELF'];
echo "http://".$url.$page;
?>
displays...
[the_url.com...]