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

  • Home
  • SEARCH
  • 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 8054697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:12:25+00:00 2026-06-05T08:12:25+00:00

I have something like this : <?php $perform_check = 1; #Checks data with ID

  • 0

I have something like this :

<?php
  $perform_check = 1; #Checks data with ID : 1
  while(true)
  {
    #code
  }
?> 

But some data must be updated in this process, is it possible to update this data from another document?

I tried something like this :

index.php

<?php
  setcookie("data", 19, time()+3600);
?>

and

loop.php

<?php
  while(true)
  {
    if($perform_check!=$_COOKIE[data]) $perform_check = $_COOKIE[data];
    #rest of code
    flush();
    sleep(0.3);
  }
?>

But it doesn’t work. I also tried $_SESSION but the page crashes on session_start().

Is it somehow possible?

  • 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-05T08:12:28+00:00Added an answer on June 5, 2026 at 8:12 am

    Cookies are sent as a HTTP header when PHP is sending a response through the web server (for example Apache2).

    All HTTP headers are sent before any output. If you output anything, headers are sent (including the set-cookie header) before the output.

    After you flush() the first time you can no longer set cookies or other headers.

    If you want a progress indicator or updates, you need to initiate whatever operation you are doing using javascript and do polling at an interval. In the process with the loop you need to save the progress in a shared memory, in a file or in a database (in this order of preference), then read that data using the process started by javascript progress check/updates check.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have something like this in one of my views <li <?php $isCurrent ?
i have done something like this: <form action=validate.php method=get> Id :<input type=text name=pID/><br/><br/> Name
I have a php script that randomly generates an image. Something like this: <?php
I have a file that defines constant variables, like this: define_vars.php <? define(something,value); define(something1,value);
I have something like this: [Description(Sets the color.), Category(Values), DefaultValue(Color.White), Browsable(true)] public Color MyColor
Can I have something like this in PHP? $variable = 'string' . function() .
Hello I have something like this: if(isset($_POST['btnProm'])){ $idads = mysql_real_escape_string($_POST['idAds']); require_once(adPromFrm.php); } When a
In CakePHP 2.0 version, I have written something like this in UsersController.php public function
I have written something like this in PHP <script type=text/javascript src=jquery.js></script></script> <script type=text/javascript> function
I have a directory with files that look like this: 001_something.php 002_something_else.php 004_xyz.php 005_do_good_to_others.php

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.