curl: provide user and password for apache .htaccess file curl: provide user and password for apache .htaccess file curl curl

curl: provide user and password for apache .htaccess file


Use this curl option for the commandline

-u "User:Password"

More details about this parameter can be found from here.


You can use this curl command for example:

curl -A "Mozilla" -L 'http://user:password@localhost/api/someapi.php'