Posts Tagged password-protected

Access files in password protected directory using curl






I had to get a page that is in a password protected directory. First I used php file_get_contents() which is always my first solution for accessing remote pages. But many web servers disable allow_url_fopen in php config. So curl is the ultimate solution. Curl has an option called CURLOPT_USERPWD that allows to add the user […]

, , ,

2 Comments