I crawled a web to get pdf documents in the web. for example, I got 9 PDFs documents from it, and the copy process for 8 PDFs runs well, except for one document. I don’t know what’s wrong, I’ve no problem with the connection. when I check out the url directly, it’s ok too, I can get that document manually. The url starts with https, it that https problem? how to solve it? I use copy function :
copy($pdfLink, $savePath . basename($pdfLink));
the error result is :
Warning: copy(https://www.aclweb.org/anthology/J/J08/J08-1004.pdf) [function.copy]: failed to open stream: Invalid argument in D:\AppServ\www\suksesfunctionWrapper.php on line 19
You might need to enable ssl in php as the file is from a https source.
I believe the extension enable is openssl. Look for the line that loads the php_openssl.dll in the php.ini and uncomment that.