Hi all
This is what I want to do: Whenever someone clicks on a external link on my website, i want the external link open in a new page that has a frameset. the top frame should display banner ads whereas the bottom frame should display the external link the user clicked.
i got a javascript on my webpage that automatcially changes all the external urls to
website>/external.php?siteUrl=<<original url>>
so a link to becomes
website>/external.php?siteUrl=http://www.google.com.au
and my external.php looks like
it works fine. but if the external url contains ? or & (request parameters) then it does not work.
I want to do something like this:
any ideas?
This is what I want to do: Whenever someone clicks on a external link on my website, i want the external link open in a new page that has a frameset. the top frame should display banner ads whereas the bottom frame should display the external link the user clicked.
i got a javascript on my webpage that automatcially changes all the external urls to
website>/external.php?siteUrl=<<original url>>
so a link to becomes
website>/external.php?siteUrl=http://www.google.com.au
and my external.php looks like
Code:
<?
if ($_GET['siteUrl']) {
$filename = $_GET['siteUrl'];
} else {
die ("no filename selected");
}
if (substr($filename,0,4) != 'http') {
$filename = "[URL unfurl="true"]http://".$filename;[/URL]
}
?>
<HTML>
<head>
<TITLE><?echo $filename ?></TITLE>
</head>
<frameset rows="120,1*" border="0" frameborder="0" framespacing="0">
<frame src="adbrite.php" scrollbar="no">
<frame src="<?echo $filename ?>">
</frameset>
</HTML>
it works fine. but if the external url contains ? or & (request parameters) then it does not work.
I want to do something like this:
any ideas?