PDA

View Full Version : [PHP and HTML] Making a redirection page


SaIRoS
08-30-2006, 11:35 AM
Well, I think this is really a nice script and can be used to redirect from a page to another. I used this many times :P


HTML version (you must put this within the <head></head> tags:
<div class='htmltop'>HTML</div><div class='htmlmain'><meta
http-equiv="refresh" content="0; url=your new address.html"></div>

content=0 is time in seconds that the page will wait untill redirect you - so change it to any time you want

url= is the redirection (destination) URL

the file mast be saved like HTML document (index.html for example)


PHP version:

Create a new document and change it's extension to PHP file. Name it index.php
Now open it with notepad and paste this code:
<?

echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=redirection URL here\"/>Your Are Now Being Redirected");
?>



as you can see it's almost the same as HTML code

change the content= fieled to whatever you want in seconds and URL= to your desired destination URL


Enjoy :cool:

KillerJoe
08-30-2006, 11:40 AM
Cool, nice little tut/info :D

Thanks!

Cheers
KJ

mony
08-30-2006, 01:43 PM
nice thnx.. :D..nether new u can do that.. and like wat killer said.. nice TUT :D

<_< my net is soo slow :( .. tommorrow it will become normal aginan :) ... thats y im inactive :)

drugi
08-30-2006, 04:38 PM
lol okay i also have a javascript one ;)
goes also in the head tag ;)

<script LANGUAGE="JavaScript">
****top.location.href='http://www.YOURURL.de/YOURSITE.html'
</script>

SaIRoS
08-30-2006, 06:57 PM
cool, thanks for posting it ;)

midgetmafia
09-06-2006, 06:24 AM
You should try putting all 3 of them in one page and see what happens. ;)

SaIRoS
09-06-2006, 10:30 AM
You should try putting all 3 of them in one page and see what happens. ;)
[/b]

I don't thisnk it's a good idea :mellow:

Haskabab
06-02-2007, 05:12 PM
it's WAY easier to use the header function.

<?php
//Direct redirection:
header("Location: http://www.urlhere.com");

//Redirection after a few seconds:
header("Refresh: 3; URL=http://www.urlhere.com");

// Refresh: ... Just fill in the number of seconds on the dots (where the 3 is.
?>

grandmst20
07-14-2008, 09:47 PM
it's WAY easier to use the header function.
<?php
//Direct redirection:
header("Location: http://www.urlhere.com");

//Redirection after a few seconds:
header("Refresh: 3; URL=http://www.urlhere.com");

// Refresh: ... Just fill in the number of seconds on the dots (where the 3 is.
?>[/b]

Agreed, this is what I stick to. :D

MagicOPromotion
05-29-2009, 08:55 PM
lets say I wanted to put a echo date"m/d/Y";
to all my 500 html. How can I do that? I dont want to copy and paste to all my html, that would be tedious. Could PHP be like CSS? just curious.

Im learning (http://www.botmasternet.com/) php. yeay wow this is fun im excited.
_______
=== XRumer 5.0 Palladium (http://www.botmasternet.com) RULEZ! ===