Jump to content

Recent Status Updates

  • Photo
      18 Aug

    When faced with a wall of errors and no hope to fix them, remember the following "Programs always do what you tell them to, and seldom what you want them to, but eventually you'll run out of things that can go wrong and it'll just work. and that's the secret to good programming."

    Show comments (2)
View All Updates

Developed by Kemal Taskin
- - - - -

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
  • 2,918 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 Redpill Linpro 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