Reputation: 4705
Say I have a page which is password protected with cPanel's directory password type of thing (htaccess), how could I access this page using PHP? So the php script would:
Any help would be greatly appreciated.
Upvotes: 0
Views: 1085
Reputation: 73031
Check out cURL.
You can set the connection options for CURLOPT_HTTPAUTH
and pass the credentials. There's actually a user comment containing code that should help you get started with Basic Auth.
Upvotes: 2