MatthewJ Posted January 10, 2011 Share Posted January 10, 2011 Hi all, I am trying to download a .zip file that is in a protected folder on an external server. If I put the URL directly to the .zip in the address bar and hit go, I am presented a basic http authentication popup for username and password (which I obv have). Could someone point me in the right direction on this one? I have tested and can download .zip files that are not protected with no problem, I guess I just need to figure out how to authenticate, then save the file in one process. Thanks for any and all help, Matt Link to comment https://forums.phpfreaks.com/topic/223971-download-restricted-zip-file-with-curl/ Share on other sites More sharing options...
QuickOldCar Posted January 10, 2011 Share Posted January 10, 2011 curl_setopt($ch, CURLOPT_USERPWD, "myusername:mypassword"); Link to comment https://forums.phpfreaks.com/topic/223971-download-restricted-zip-file-with-curl/#findComment-1157418 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.