Detecting user abort or timeout [download script]

This is a discussion on Detecting user abort or timeout [download script] within the PHP Language forums, part of the PHP Programming Forums category; I'm writing a download script in php. This script sends files using echo in order to limit download speed. ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-14-2004
mike_j
 
Posts: n/a
Default Detecting user abort or timeout [download script]

I'm writing a download script in php. This script sends files using
echo in order to limit download speed. My script has to do something
after connection abort. Everything is ok unless client pauses
downloading.

I'm using ignore_user_abort() and I'm checking connection_status()
while sending a file. When the user aborts connection, my loop breaks
and script finishes its job. But if the user pauses connection, the
script still sends a file!

I want my script to execute some commands after a break of the loop and
not to send file, if the user doesn't receive it! I don't know how to
implement that. Is it possible to do such script? Please help me. TIA

Reply With Quote
  #2 (permalink)  
Old 12-14-2004
Gordon Burditt
 
Posts: n/a
Default Re: Detecting user abort or timeout [download script]

>I'm writing a download script in php. This script sends files using
>echo in order to limit download speed. My script has to do something
>after connection abort. Everything is ok unless client pauses
>downloading.
>
>I'm using ignore_user_abort() and I'm checking connection_status()
>while sending a file. When the user aborts connection, my loop breaks
>and script finishes its job. But if the user pauses connection, the
>script still sends a file!


How does a user running a web browser PAUSE a connection? (intentionally,
that is)

Gordon L. Burditt
Reply With Quote
  #3 (permalink)  
Old 12-15-2004
G-man
 
Posts: n/a
Default Re: Detecting user abort or timeout [download script]


"Gordon Burditt" <gordonb.63m49@burditt.org> wrote in message
news:cpnfj9$7fb@library1.airnews.net...

> How does a user running a web browser PAUSE a connection? (intentionally,
> that is)


I imagine he means people downloading the file using a download manager
perhaps?

Ta,
G.


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:23 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0