Author Topic: please help me using PHP Redirect page funtions  (Read 187 times)

0 Members and 1 Guest are viewing this topic.

Offline pkloverTopic starter

  • Irregular
  • Posts: 3
    • View Profile
please help me using PHP Redirect page funtions
« on: March 13, 2010, 11:14:56 PM »
can any help me ? i want to use php for page redirection like iframe

<iframe src="www.mydoamin.com/page.php" width="500" height="450">
</iframe>

if this iframe use in my site redirect to www.mydoamin.com/mysitepage.html

if this iframe any other use than redirect to
www.mydoamin.com/sorry.html

Offline ocpaul20

  • Enthusiast
  • Posts: 153
  • Gender: Male
    • View Profile
    • What Causes Stress?
Re: please help me using PHP Redirect page funtions
« Reply #1 on: March 13, 2010, 11:38:53 PM »
As you probably know, php is all done serverside and is run before you get to see the page in html so iframe code would have to be generated in the php part of the program. In php, you can check $_SERVER['SERVER_NAME'] if you need to check the domain name and branch accordingly.

Unless you have control of the page that the iframe is placed on, I do not think that you can use php to do that kind of check. I might be mistaken though, see what others say.