Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

PHP refresh/redirect script!


  • Please log in to reply
2 replies to this topic

#1 pormadori


    CC Newcomer

  • Just Joined
  • PipPip
  • 20 posts

Posted 05 May 2009 - 08:42 AM

header("Refresh: 5; url=http://www.aesdfhtg.com/");
Test test

This script will just after 5 seconds redirect user to page www.aesdfhtg.com

How to make the script so it does like this:
1. Refreshes the page after 5 seconds.
2. Refreshes the page again, but after 8 seconds.
3. Waits 2 seconds and redirects user to page www.aesdfhtg.com

How should the script look like?
  • 0

#2 Orjan


    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 07 May 2009 - 03:05 AM

you need an parameter sent with the page telling in which phase of the updating you hare like


and change the number for each phase, then in your php-file, you have a switch statement telling what to do on each phase...
  • 0

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.

#3 MohammadReza


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 10 May 2009 - 12:57 PM


Here is a sample :

$wait = $_GET['w'];
$url = ""; // Put here you address.
header("Refresh: $wait; url=$url");

Mohammad Reza
  • 0

Also tagged with one or more of these keywords: redirect

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download