onlyican Posted August 30, 2006 Share Posted August 30, 2006 HeyI am using iframe to call a page and show it in the iframeGood as thats what iframe does.Say The page is calledMyPage.phpand I am callingcallme.phpis there a way to check that callme.php is being called by MyPage.phpso then I can put something like below on callme.php if(MyPage.php called this page){//show Content}else{header("Location: index.php");}I hope this makes sence Quote Link to comment https://forums.phpfreaks.com/topic/19149-checking-page-call-using-iframe/ Share on other sites More sharing options...
ober Posted August 30, 2006 Share Posted August 30, 2006 $_SERVER['HTTP_REFERER'] should get you that info (my spelling might be a little off... check the manual). Quote Link to comment https://forums.phpfreaks.com/topic/19149-checking-page-call-using-iframe/#findComment-82842 Share on other sites More sharing options...
onlyican Posted August 30, 2006 Author Share Posted August 30, 2006 Does IFRAME work if $_SERVER['HTTP_REFERER'] Quote Link to comment https://forums.phpfreaks.com/topic/19149-checking-page-call-using-iframe/#findComment-82868 Share on other sites More sharing options...
ober Posted August 30, 2006 Share Posted August 30, 2006 Loading a page through an IFRAME should work the same as if you loaded the page by refreshing the browser. Quote Link to comment https://forums.phpfreaks.com/topic/19149-checking-page-call-using-iframe/#findComment-82879 Share on other sites More sharing options...
scottybwoy Posted August 30, 2006 Share Posted August 30, 2006 You might be able to do something like$mypage = $_SERVER['HTTP_REFERER']IF ($mypage = !NULL) {// Show Content} else {header("Location: index.php");}surely you can put your <IFRAME> in the show content bit, hope that helps Quote Link to comment https://forums.phpfreaks.com/topic/19149-checking-page-call-using-iframe/#findComment-82889 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.