Hey,
I'm trying to remotely download an image to my server via the web and an URL that the user inputs. I have managed to do this with a cron job, and write the file to the system no problem.
My problem lies with viewing the image, the image wont show. I looked at the source code of the image and it seems to be because PHP is writing data to the top of the file,
Is there anyway I can stop PHP doing this, or remove it from the code with some sort of preg_match before writing it to disk.
Or is there an alternative method I should be using?
thanks in advance for any time and help.
I'm trying to remotely download an image to my server via the web and an URL that the user inputs. I have managed to do this with a cron job, and write the file to the system no problem.
My problem lies with viewing the image, the image wont show. I looked at the source code of the image and it seems to be because PHP is writing data to the top of the file,
Code:
HTTP/1.1 200 OK Set-Cookie: JCPARPT=ZLNIZZSSRVDXECKKMO; path=/ Content-Length: 9566 Content-Type: image/jpeg Last-Modified: Fri, 05 May 2006 22:14:11 GMT Accept-Ranges: bytes ETag: "8811773c9170c61:9be" Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Date: Wed, 13 Jun 2007 14:13:08 GMT ÿØÿà�JF
Or is there an alternative method I should be using?
thanks in advance for any time and help.
Comment