|
|
 |
Re: FN-FORUM: PHP Download script
date posted 16th January 2008 12:19
Richard Harrison wrote:
>
> >> I'm having a slight problem with a PHP download script that I am
> helping a client with.
> > Thanks every one who has helped. None of the above has worked, I've
> tried setting the content-type to jpeg, using the mime type as the same
>
> The headers aren't going to affect the contents of the file, just what
> the user-agent does with it. I'd look at the code that squirts out the
> image and verify it hasn't got a fault, and also that the images on
> the server aren't corrupted.
>
> What also helps is to use something that will show you the http
> headers, I use wget -d, and the following is the result for a random jpg:
>
> --12:53:50-- http://www.akelos.org/images/logo.jpg
> => `logo.jpg'
> Connecting to www.akelos.org:80... Created fd 744.
> connected!
> ---request begin---
> GET /images/logo.jpg HTTP/1.0
> User-Agent: Wget/1.6
> Host: www.akelos.org
> Accept: */*
>
> ---request end---
> HTTP request sent, awaiting response... HTTP/1.1 200 OK
> Date: Wed, 16 Jan 2008 11:53:53 GMT
> Server: Apache/1.3.37 (Unix) (extra stuff removed here by me)
> Last-Modified: Tue, 10 Jul 2007 11:24:38 GMT
> ETag: "788046-1327-46936c8d"
> Accept-Ranges: bytes
> Content-Length: 4903
> Connection: close
> Content-Type: image/jpeg
>
>
I've tried most of the suggestions, When the file is FTP'd to the site,
the file is fine and un-corrupted. It is only when it is downloaded it
becomes corrupted. I have changed the system so that the source file is
compressed to a zip file and it downloads fine now.
Many thanks for all your help and suggestions.
Steve
|
 |
|