Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9056907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:19:09+00:00 2026-06-16T14:19:09+00:00

i want to refresh page or redirect page after 4 mints to new url

  • 0

i want to refresh page or redirect page after 4 mints to new url every time it refresh or redirect
Example some thing like this

$i=1
while($i = 100){
 //** Now URL redirect here 
$url="u_pc_change.php?id=$i";
echo '<meta http-equiv="refresh" content="2;url='.$url.'">';
$i++;
 }

some code which wait here for 4mints and redirect or refresh the page to new url like

u_pc_change.php?id=1
u_pc_change.php?id=2
u_pc_change.php?id=3

Above code will not work because it do fast loop and nothing will wait for 4 mints … i need a way to wait 4 mints before 2nd loop happen …. for refresh or redirect.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T14:19:10+00:00Added an answer on June 16, 2026 at 2:19 pm

    If you want to wait 4 minutes, you can use JS like this:

    <script>setTimeout(function() { document.location='your_desired_location';},1000 * 60 * 4);</script>
    

    If I understand you correctly, you want to show something different every 4 minutes regardless if user refreshed page, left and returned, or just stayed on page for 4 minutes.

    You can save user refresh time and check it next time.

    session_start();
    if( !isset($_SESSION['lastRefresh']) ) $_SESSION['lastRefresh'] = time(); //User is here for first time
    else {        
        if( time() - $_SESSION['lastRefresh']  > 60 * 4 )//Show something else
        {
          $_SESSION['lastRefresh'] = time();//This is in if, so "timer" won't reset if user refresh before 4 minutes.
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to submit a form without page refresh using jQuery. I found some
I want to refresh a table using a SSIS package every time the user
I want to do something like this. while pressing the refresh button, it will
I want to redircet to another page by meta refresh, but only after all
I want to refresh Google Map and send new geolocalization request without refreshing the
i just want to find out the name of this grid to refresh it.
I am very new to ajax concept,I want to submit a form without refresh
When I refresh a page or redirect to the same one using the same
I'm using a repeater on my page. I want to populate this repeater based
a page directs users back to a page automatically <meta http-equiv=refresh content=1; URL=http://localhost/mywebsite/Untitled9.php> when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.