How can i fix this?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Maluendaster
Forum Contributor
Posts: 124
Joined: Fri Feb 25, 2005 1:14 pm

How can i fix this?

Post by Maluendaster »

I have a site that links to other sites, what i'm trying to do, is when the user clicks the link, it open the other site but with a frame so it doesn't leave my site (kind of like hotmail when you click a link in a mail) .. I have this

index.php
the links are like this :

Code: Select all

link.php?url=http://fmshaon.blogspot.com/2007/01/even-windows-xp-fears-president-bush.html
link.php

Code: Select all

<FRAMESET ROWS="38,*" cols="*">
<FRAME NAME="arriba" SRC="up.php" MARGINWIDTH="10" MARGINHEIGHT="10" SCROLLING="no" FRAMEBORDER="0">
<FRAME NAME="abajo" SRC="<?php echo $url ?>" MARGINWIDTH="10" MARGINHEIGHT="10" SCROLLING="auto" FRAMEBORDER="0">
</FRAMESET>
thank you.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Have you tried it? Is register_globals on (which it should not be)?
Maluendaster
Forum Contributor
Posts: 124
Joined: Fri Feb 25, 2005 1:14 pm

Post by Maluendaster »

Everah wrote:Have you tried it? Is register_globals on (which it should not be)?
register_globals is off... i tried both ways and it doesnt work...
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Does the frame layout work without the dynamic addition? I mean, can you do this...

Code: Select all

<FRAMESET ROWS="38,*" cols="*"> 
<FRAME NAME="arriba" SRC="up.php" MARGINWIDTH="10" MARGINHEIGHT="10" SCROLLING="no" FRAMEBORDER="0"> 
<FRAME NAME="abajo" SRC="http://fmshaon.blogspot.com/2007/01/even-windows-xp-fears-president-bush.html" MARGINWIDTH="10" MARGINHEIGHT="10" SCROLLING="auto" FRAMEBORDER="0"> 
</FRAMESET>
Also, have you looked at urlencode() and urldecode()?
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

So you've tried it using

Code: Select all

$_GET[url];
aswell ??
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

Code: Select all

<a href="link.php?url=http://www.somesite.com" target="abajo">link will open link.php in frame named "abajo", and redirect to somesite.com</a>
Post Reply