Detecting user abort or timeout [download script]

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mike_j

    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_abo rt() and I'm checking connection_stat us()
    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

  • Gordon Burditt

    #2
    Re: Detecting user abort or timeout [download script]

    >I'm writing a download script in php. This script sends files using[color=blue]
    >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_abo rt() and I'm checking connection_stat us()
    >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![/color]

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

    Gordon L. Burditt

    Comment

    • G-man

      #3
      Re: Detecting user abort or timeout [download script]


      "Gordon Burditt" <gordonb.63m49@ burditt.org> wrote in message
      news:cpnfj9$7fb @library1.airne ws.net...
      [color=blue]
      > How does a user running a web browser PAUSE a connection? (intentionally,
      > that is)[/color]

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

      Ta,
      G.


      Comment

      Working...