PC Playground  

Go Back   PC Playground > The Core > Scripting/Programming
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-26-2003, 09:59 PM
Administrator
 
Join Date: Jan 2003
Posts: 1,348
Default PHP Website forwarding

I need this code to be done in PHP.

I need it to load a page, then after 5 seconds it will go to a different page (and stay there).

Examples of places this is done is on download pages, when you click download and 5 seconds later it redirects you to the actual file.

I already have the page I want this on, all the text and everything, so all I need is the code to wait a few seconds, then forward to a different page (in the same window).

In Summary:
The page loads, waits a few seconds, and forwards to a different page.

Must be done in PHP.
Reply With Quote
  #2 (permalink)  
Old 01-26-2003, 11:08 PM
Senior Member
 
Join Date: Jan 2003
Location: The Chair In Front Of My PC...
Posts: 597
Default

cant you just use java?
Reply With Quote
  #3 (permalink)  
Old 01-26-2003, 11:12 PM
Administrator
 
Join Date: Jan 2003
Posts: 1,348
Default

Umm.... as I said... it needs to be in PHP. I have a PHP page... and I want it added to it.
Reply With Quote
  #4 (permalink)  
Old 01-26-2003, 11:14 PM
Senior Member
 
Join Date: Jan 2003
Location: The Chair In Front Of My PC...
Posts: 597
Default

i understand you want it in php... but it can still be done in java or javascript or whatever... and it doesnt matter if your page is in php
Reply With Quote
  #5 (permalink)  
Old 01-26-2003, 11:15 PM
Senior Member
 
Join Date: Jan 2003
Location: Southern California
Posts: 142
Send a message via AIM to xero Send a message via MSN to xero Send a message via Yahoo to xero
Default

^ what he said.. just place the javascript right into the php page... javascript can be in any html file, including .php
Reply With Quote
  #6 (permalink)  
Old 01-26-2003, 11:27 PM
Senior Member
 
Join Date: Jan 2003
Location: Southern California
Posts: 142
Send a message via AIM to xero Send a message via MSN to xero Send a message via Yahoo to xero
Default

i made a quick php page with a redirection javascript in it.. is this the kind of thing youre trying to do?

http://ztek.pcplayground.com/javascript_test.php
Reply With Quote
  #7 (permalink)  
Old 01-28-2003, 09:08 PM
Member
 
Join Date: Jan 2003
Location: USA
Posts: 37
Default

<?php
echo "<meta http-equiv=\"refresh\" content=\"1;URL=yourdir/yourdir/file.php\">";

?>

replace the "1" with the time in seconds u want it to take before it goes to the specified page. thats the only way u can do it in php if u want it to wait before redirecting. the php function header("location: blah.php"); will immediatly redirect you. no time control. so u should use the one up there for what u wanna do.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:23 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.