RE: [PHP] Stopping the browser from continuing to load
| From: | Jason Murray | Date: | Fri, 19 Oct 2001 06:14:32 +0000 |
| Subject: | RE: [PHP] Stopping the browser from continuing to load | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-71547@lists.php.net to get a copy of this message | ||
What if you were to trigger a hit to the script that actually does
the processing in the background with cURL, and give it a 2 second
timeout?
PHP tells cURL to hit the processing PHP script, cURL hits the
processing PHP script, cURL returns 2 seconds later but cURL's abort
is ignored by the processing PHP script.
Hey presto, zombie script running and the PHP script hit by the browser
can stop loading.
Of course, I dunno if that'll work. :)
Jason
--
Jason Murray
jasonm@melbourneit.com.au
Web Developer, Melbourne IT
"Work now, freak later!"
> -----Original Message-----
> From: Adam.Whitehead@compsm.com.au
> [mailto:Adam.Whitehead@compsm.com.au]
> Sent: Friday, October 19, 2001 3:38 PM
> To: php-general@lists.php.net
> Subject: [PHP] Stopping the browser from continuing to load
>
>
> Hi All-
>
> I have a script in which I use ignore_user_abort() to perform some
> extensive processing that
> can take a few hours which there is no need for users to wait for.
>
> I display a message saying their submission is complete and
> continue to run
> the PHP script
> in the background. It doesn't matter if they close their browser or
> whatever, as the script continues
> to run.
>
> My problem is, I want the browser to stop waiting for more
> output from the
> script. It confuses people
> when it says you may now close the browser when the icon in
> the top right
> is still moving and the progress
> bar is still moving.
>
> Is there any way in PHP (or even Javascript) that I can tell
> the browser to
> close the connection
> (ie. the equivalent of hitting the stop button).
>
> Apparently "window.stop()" in javascript works in Netscape
> Navigator but
> not in IE. I really need this to
> work in IE (and it only need be IE!).
>
> Any ideas?
>
> PS/ Not really keen on running a cron job to do the same thing when it
> would be easier just to stop
> the browser from loading.
>
> -Adam
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>