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 Quote 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. Quote 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... Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.