Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cURL options in php - what option is -u [closed]

Tags:

curl

The reference I have lists an option as:

curl -u 'ExactID:Password'\

Does this mean for me to just use CURLOPT_USERPWD and use the format ExactID:Password?

like image 787
Magic Lasso Avatar asked Sep 13 '12 20:09

Magic Lasso


People also ask

How do you check php cURL is enabled or not?

Create phpinfo. php file and save. phpinfo; ?> Then go to http://domainname/phpinfo.php to check whether CURL is enabled or not.

How does cURL work in PHP?

cURL is a PHP extension that allows you to use the URL syntax to receive and submit data. cURL makes it simple to connect between various websites and domains. Obtaining a copy of a website's material. Submission of forms automatically, authentication and cookie use.

How do I know if my cURL is working?

To check whether the Curl package is installed on your system, open up your console, type curl , and press enter. If you have curl installed, the system will print curl: try 'curl --help' or 'curl --manual' for more information .


1 Answers

Yes, the CLI -u option is equivalent to the PHP CURLOPT_USERPWD option, and the value is the same.

like image 104
Barmar Avatar answered Jan 01 '23 22:01

Barmar