Re: URL parsing, help
- From: "rf" <rf@xxxxxxxxxxx>
- Date: Fri, 28 Nov 2008 03:29:09 GMT
"trookat" <trookat@xxxxxxxxxxxxx> wrote in message
news:492f48a8$1@xxxxxxxxxxxxxxxxxxxx
Rhialto wrote:
On 27 nov, 19:29, Rhialto <Rhia...@xxxxxxxxx> wrote:
On 27 nov, 19:05, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:
Rhialto wrote:Found it, thanks for the clue!
With a lot of search in Google I made it in JS but there is a part I'dLook at the $_GET superglobal.
like to be in PHP and I can't find how to do it.
From a page that usually display in a frame I have this JS :
if (self == top) { top.location.href="/index.php?url=test.php"; }
Now you may have guessed what I'm trying to do, load the top page but
with the frame I passed in the URL
I successfully achieved my goal with JS but I think it would be nice
using PHP.
How can I extract only "test.php" from the URL so I can:
<?php echo "<iframe src=\'" + url + "'>" ?>
Thanks
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@xxxxxxxxxxxxx
==================
I'm no php expert and even if the next line works, maybe someone can
optimize it?
<iframe src="<?php if ($_GET["url"] == "") { echo "default.php"; }
else { echo $_GET["url"]; } ?>"></iframe>
What you have is fairly optimized however it is not secure. people could
use this to load url's that you are not wanting.
True but in this case it is no different to the people simply typing the
"url" into their address bar. Same result, except it's not in an iframe.
.
- References:
- URL parsing, help
- From: Rhialto
- Re: URL parsing, help
- From: Jerry Stuckle
- Re: URL parsing, help
- From: Rhialto
- Re: URL parsing, help
- From: Rhialto
- Re: URL parsing, help
- From: trookat
- URL parsing, help
- Prev by Date: Re: URL parsing, help
- Next by Date: Re: php form and ssi
- Previous by thread: Re: URL parsing, help
- Next by thread: sessions not working
- Index(es):
Relevant Pages
|