Do you know how to use CURL, Client URL Library Functions to get a page that is protected with htaccess if you know the username and password for the realm?
I tried this
Code:
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_USERPWD, "[username]:[password]");
//curl_setopt ($ch, CURLOPT_HEADER, 0); with and without this line
curl_exec ($ch);
curl_close ($ch);
but it says I didn't authenticate.
I've used it in the past to get an unprotected url and even to pass info via post.
Or is there a way to pass it in the url like we would for ftp?