So I want to send people to a page that will eventualy redirect to them to the content they want, I am having a problem because i want the code to take a variable from the url, for example the site I want it to redirext to would be specified in the original url, for example: PHP Code: www.site.com/file.php?page=www.redirectedsite.com
JavaScript redirect
8
So I want to send people to a page that will eventualy redirect to them to the content they want, I am having a problem because i want the code to take a variable from the url, for example the site I want it to redirext to would be specified in the original url, for example:
Redirected site being the new url...
At first i tried this, combining some php
If I replace the red bit with a normal url such as Google It will redirect no problem but with the php It takes the url but gives me www.site.com/http://www.google.com
I have tried to explain the best I can, any help would be wonderful
Thanks In advance!
I have also tried this but it dosent even pick up the redirect url...
PHP Code:
www.site.com/file.php?page=www.redirectedsite.com
At first i tried this, combining some php
PHP Code:
<html>
<head>
<script type="text/javascript">
function delayedRedirect(){
window.location = "<?php echo $_GET['page']; ?>"
}
</script>
</head>
<body onLoad="setTimeout('delayedRedirect()', 3000)">
<h2>You'll be redirected soon!</h2>
</body>
</html> I have tried to explain the best I can, any help would be wonderful
Thanks In advance!
I have also tried this but it dosent even pick up the redirect url...
PHP Code:
<html>
<head>
<script type="text/javascript">
var link = getUrlVars()["page"];
function delayedRedirect(){
window.location = link
}
</script>
</head>
<body onLoad="setTimeout('delayedRedirect()', 3000)">
<h2>You'll be redirected soon!</h2>
</body>
</html>
- Amir Khan
- khtm
- [1] reply
- Amir Khan
- [1] reply
- Amir Khan
Next Topics on Trending Feed
-
8