Jump to content

Archived

This topic is now archived and is closed to further replies.

onlyican

Checking Page Call Using IFRAME

Recommended Posts

Hey

I am using iframe to call a page and show it in the iframe
Good as thats what iframe does.

Say The page is called
MyPage.php
and I am calling
callme.php

is there a way to check that callme.php is being called by MyPage.php
so 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

Share this post


Link to post
Share on other sites
$_SERVER['HTTP_REFERER'] should get you that info (my spelling might be a little off... check the manual).

Share this post


Link to post
Share on other sites
Loading a page through an IFRAME should work the same as if you loaded the page by refreshing the browser.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.