Hey guys,
I'm running into something weird that has me stumped. I'm using fopen and fpassthru to download files through a script, but I'm getting an error with fopen. First off, it takes forever for the errors to come up, almost like a timeout. But, when they do come up, they say:
Warning: fopen(http://downloads.mycws.com/files/templates1/template_002.zip): failed to open stream: HTTP request failed! in /home/mysite/public_html/downloads/index.php on line 121
Warning: fpassthru(): supplied argument is not a valid stream resource in /home/mysite/public_html/downloads/index.php on line 133
The weird thing is, you can download the file (http://downloads.mycws.com/files/templates1/template_002.zip) just fine if you put that in your browser. I don't get why it's not working with fopen.
Does anyone have any suggestions?
Thanks,
Matt