You are here: Re: Tracking download completion « PHP Programming Language « IT news, forums, messages
Re: Tracking download completion

Posted by Andy Jeffries on 02/15/07 09:26

On Wed, 14 Feb 2007 23:19:01 -0800, andrew.zahra wrote:
> Is there any way to track completion of a download with PHP? I would like
> to be able to check if a download completed successfully.
>
> My first thought is that I might need to use an applet?
>
> Any suggestions appreciated.

According to the PHP manual, scripts are aborted if the client
disconnects. Therefore assuming you're using a PHP script to download the
file if it gets to the line after readfile() (or some such code) then the
client connection is still active and therefore the download completed.

However, you can turn this functionality off so the script always
completes whether the client disconnects or not. So it may be best to use
connection_aborted() to see if the client is still connected.

You can read more about it here:

http://uk.php.net/manual/en/features.connection-handling.php

Cheers,


Andy


--
Andy Jeffries MBCS CITP ZCE CMDEV
Zend Certified Engineer
Certified MySQL Developer
gPHPEdit Lead Developer - http://www.gphpedit.org

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация