473,395 Members | 1,411 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Question about download script in PHP

I have a web site where we offer MP3 downloads (yes, they are
legal!). I've written a PHP script using readfile() (or fpassthru())
that sends the file using HTTP headers (via various header()
directives). The script launches the download fine and the download
proceeds normally. However, after 20MB - 35MB of the download
completes, the download suddenly completes even though the entire file
wasn't download. (The download does not fail.) The portion of the
file that was download is good/valid, but just incomplete. I have
observed this behavior in both MSIE and Firefox 2.0 and 3.0 with
multiple ISPs.

Do you have any suggestions about correcting this problem?

Thanks!
Aug 31 '08 #1
1 1210
Tim Jones wrote:
I have a web site where we offer MP3 downloads (yes, they are
legal!). I've written a PHP script using readfile() (or fpassthru())
that sends the file using HTTP headers (via various header()
directives). The script launches the download fine and the download
proceeds normally. However, after 20MB - 35MB of the download
completes, the download suddenly completes even though the entire file
wasn't download. (The download does not fail.) The portion of the
file that was download is good/valid, but just incomplete. I have
observed this behavior in both MSIE and Firefox 2.0 and 3.0 with
multiple ISPs.

Do you have any suggestions about correcting this problem?

Thanks!
Is your script timing out?

How long does it take to download that amount? What's your PHP timeout
value?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Aug 31 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: JimC | last post by:
Here's an interesting problem - On one of my pages, I have a place where a user can download a ZIP file by clicking on the phrase "Click to download". I want to call a logging function that I...
3
by: Rod | last post by:
Hi, I have a script that download any file to the user according to the parameters. I call the script like this: download.php?file=xxx/myfile.doc&file_short=myfile.doc My script is working...
6
by: Samir | last post by:
Hello, I have a website that is hosted by another company. Is there some kind of php script to limit downloading to a certain amount size? And is there kind thing I can do to the .htaccess...
3
by: JimC | last post by:
Suppose a developer has a setup.exe file that can be downloaded from his online site, rather than from a distribution CD. If the targeted user were using a CD, of course it would be easy to...
4
by: Pete Horm | last post by:
Hi everyone, I have a question about using this variable. I am new to programming and I had a book that was a couple of years old regarding php programming. None of the examples were working...
2
by: Jan Paul van de Berg | last post by:
I have a piece of software that people can download and a third party promoting that software. In order for them to be able to count the number of downloads, I have to put a tracking code on my...
1
by: Joey Nolan | last post by:
Hi, I have a PDF file on my site that I want to distribute freely but I want to be able to contact anyone who downloaded it to warn them about mistakes and modification and new versions and...
3
by: Andy Baker | last post by:
I have an SQL Server 2005 database that is populated with a customer's data. I want to create a new database, in exactly the same format, so that I can set up a system for a potential new customer...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.