473,743 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1229
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*******@attgl obal.net
=============== ===

Aug 31 '08 #2

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

Similar topics

3
3584
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 use to show that the file was downloaded. The file being downloaded is called file1.zip. What I now do is the following: <a href= "..\..\downloads\file1.zip">
3
3207
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 fine except with N4.7 It opens the download box, but the name is download.php instead of myfile.doc
6
1831
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 file to limit this as well??? For example I have a little media file say about 3MB or something. Once someone visits the site and wants to download this file (ie. http://www.domain.com/dir/file.wmv), I would like something check
3
1453
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 include dotnetfx.exe on the CD and install it silently (or relatively silently) if needed. But from an online download, how is the problem of getting .NET Framework onto the target computer solved in a graceful manner? That's a 25-MByte file, and...
4
1621
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 correctly, until I discovered that my new version of PHP 4.4 disabled global variables. I figured out how to make the following php script work correctly, but I don't know if the way I made it work is the accepted way of doing things with $_POST. I...
2
2563
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 site. The tracking code must be sent to the client when the user clicks the download button. At the same time, the download must start. The download button links to this page: - Possibility 1, server side redirect to executable...
1
2076
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 updates... So I need some way to keep their email addresses and someway to prevent them sharing the link to the PDF file. I've seen some sites - with a form for the user to fill in
3
1553
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 to start converting his data. Initially I want to create a 'blank' database, so I went into SQL Server Management Studio - Databases. Right-click on database name and click Tasks - Generate Scripts. I selected 'Script all objects in Selected...
1
47476
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 on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
8795
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9344
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9277
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9214
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6763
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6057
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4827
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2195
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.