
Would be better.PHP Code:<?php
function redirect( $url, $time = 0 )
{
if( !headers_sent() AND $time == 0)
{
header( 'Location: ' . $url );
}
else
{
echo( '<meta http-equiv="refresh" content="' . $time . ';url=' . $url . '" />' );
}
}
?>
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
Actually it wouldn't, because it's not getting the URL![]()
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
Could do it in javascript + some PHP.
http://www.jamesrozee.com/urlRedirec...//google.co.ukPHP Code:<html>
<head>
<script type="text/javascript">
var time = 3; // in seconds...
var urlRedirect = '<?php echo ( $_GET [ 'url' ] ) ?>';
var time_redirect = time * 1000;
function checkUrl ()
{
// Don't know why we're checking this lawl
if ( urlRedirect == '' )
{
// Don't do nothing...
}
else if ( urlRedirect == 'homepage.php' )
{
// msgbox ( 'You are getting redirected in ' + time + ' seconds...' );
document.write( 'You are getting redirected in ' + time + ' seconds...' );
setTimeout( 'window.location = "' + urlRedirect + '"', time * 1000 );
}
else if ( urlRedirect != '' )
{
// msgbox ( 'You are getting redirected in ' + time + ' seconds...' );
document.write( 'You are getting redirected in ' + time + ' seconds...' );
setTimeout( 'window.location = "' + urlRedirect + '"', time * 1000 );
}
}
</script>
<title>Webpage Redirect</title>
</head>
<body onLoad="checkUrl();">
</body>
</html>
Last edited by Protege; 16-06-2008 at 12:54 AM.
Hi, names James. I am a web developer.
Nice seeing some code, but all of this seems incredibly pointless to one of simplest things.
Ooh look, and we didn't need php.Code:You will be directed to the page in [insert time here] seconds. <meta http-equiv="refresh" content="[insert time here];[insert link here]" />
And echo isn't a function so why on earth would you use parentheses/brackets?
Must of been a long day.![]()
How could this hapen to meeeeeeeeeeeeeee?lol.
How cute, lol.Nice seeing some code, but all of this seems incredibly pointless to one of simplest things.
Ooh look, and we didn't need php.Code:You will be directed to the page in [insert time here] seconds. <meta http-equiv="refresh" content="[insert time here];[insert link here]" />
And echo isn't a function so why on earth would you use parentheses/brackets?
Must of been a long day.
Charlie thinking he's smarter than the best coder(s).
Doesn't matter if you use brackets or not. Its a personal coding preference.
Nice seeing some code, but all of this seems incredibly pointless to one of simplest things.
Ooh look, and we didn't need php.Code:You will be directed to the page in [insert time here] seconds. <meta http-equiv="refresh" content="[insert time here];[insert link here]" />
And echo isn't a function so why on earth would you use parentheses/brackets?
Must of been a long day.
Last edited by Protege; 16-06-2008 at 08:16 AM.
Hi, names James. I am a web developer.
I can really see [insert time here] and [insert link here] being variables. Hmm. :eusa_eh:Nice seeing some code, but all of this seems incredibly pointless to one of simplest things.
Ooh look, and we didn't need php.Code:You will be directed to the page in [insert time here] seconds. <meta http-equiv="refresh" content="[insert time here];[insert link here]" />
And echo isn't a function so why on earth would you use parentheses/brackets?
Must of been a long day.
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
There doesn't seem any point in using variables. You only need to output the variables once. Invent that wasn't nice.
How could this hapen to meeeeeeeeeeeeeee?lol.
Yes, I agree that this script is pretty useless - I'd never use it in all honesty.
Hi, names James. I am a web developer.
Want to hide these adverts? Register an account for free!