hasanatkazmi Posted August 8, 2007 Share Posted August 8, 2007 I want to find the page from which i have been reffered e.g from this : http://www.mydomain.com/hello.php?wh=abs&i=as i only want hello.php, how to find that Link to comment https://forums.phpfreaks.com/topic/63894-how-to-find-refferer-url/ Share on other sites More sharing options...
gerkintrigg Posted August 8, 2007 Share Posted August 8, 2007 $referrer=$_SERVER['HTTP_REFERRER']; echo $referrer; then to cut out all the superfluous pants... you could use: $referrer=explode('http://www.mydomain.com',$referrer); echo $referrer[1]; but that'd give you all the $_REQUEST variables too to get around that just explode again using '?' as the delimiter and give that a try. Link to comment https://forums.phpfreaks.com/topic/63894-how-to-find-refferer-url/#findComment-318471 Share on other sites More sharing options...
torb Posted August 8, 2007 Share Posted August 8, 2007 I think there's a spelling mistake in the PHP function name there, though. I thnk it's called $_SERVER['HTTP_REFERER'] with just one R... Link to comment https://forums.phpfreaks.com/topic/63894-how-to-find-refferer-url/#findComment-318495 Share on other sites More sharing options...
hasanatkazmi Posted August 8, 2007 Author Share Posted August 8, 2007 torb u are right, u spelled it in the right way Link to comment https://forums.phpfreaks.com/topic/63894-how-to-find-refferer-url/#findComment-318544 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.