Hi guys and maybe there are girls here lol,
I wanna ask a question regarding redirection in php.
Supposed that I have a file called "go.php", and then redirect to -> "destination.php". Of course from this schema we know that the content in "destination.php" is the code I created by myself in "destination.php".
My question : is it possible in PHP that I want to redirect from "go.php" -> "destination.php", but the content in "destination.php" comes from another page/sites, for example the content comes from "myblog.com", while the address bar in browser still shows "destination.php", not "myblog.com" ?
I really appreciate if this kind of scenario is possible and you guys and girls could help me.
Thanks before
Redirect to Page But The Content is Other Page
Moderator: General Moderators
- mecha_godzilla
- Forum Contributor
- Posts: 375
- Joined: Wed Apr 14, 2010 4:45 pm
- Location: UK
Re: Redirect to Page But The Content is Other Page
Hi,
You could do this a couple of ways I think - the obvious one is just to load the external page into an iframe that's 100% width and height of the page (or with a small banner at the top, which is what sites like Linkedin do) but you could also use the cURL library to retrieve the page output of the external site and then process it afterwards in your own script if you really wanted to hide the real address of the site, just bearing in mind that if someone looks at the source for your iframe page they'll see exactly what site is being loaded into it.
HTH,
Mecha Godzilla
You could do this a couple of ways I think - the obvious one is just to load the external page into an iframe that's 100% width and height of the page (or with a small banner at the top, which is what sites like Linkedin do) but you could also use the cURL library to retrieve the page output of the external site and then process it afterwards in your own script if you really wanted to hide the real address of the site, just bearing in mind that if someone looks at the source for your iframe page they'll see exactly what site is being loaded into it.
HTH,
Mecha Godzilla