Re: Execute a scipt in the background
| From: | Justin Patrin | Date: | Tue, 20 Jul 2004 16:10:34 +0000 |
| Subject: | Re: Execute a scipt in the background | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191186@lists.php.net to get a copy of this message | ||
On Thu, 17 Jun 2004 11:59:45 +0530, narender <narendra@xicom.biz> wrote:
> I want to start the execution of a script in the background at the time of user login. In the
> script there is infinite loop which is checking something after every 10 seconds and if it get true
> value the it open a popup window on the brower and if the user session expires then it terminate the
> script.
> how can I acheive this ?
>
> I have tried to do this by putting the script path in the img tag in th src parameter but its
> not working. Is there any way of executing a file by means of writing a command in the php script.
>
You *may* be able to start a script in the background, but once the
first request to the webserver finishes, you can't interact with the
file again.
I would say do the check on every page load and popup your popup then.
You could also add some JS to make a call back to the webserver (via a
hidden iframe) to check to see if it should popup.
You could also run a PHP script from cron that writes a file (to /tmp,
say) that lets a request know when to popup. On every request, you
check for the file and popup if it's there. I definate;y do not
suggest this one.
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--