Flavio Copes
Flavio Copes

Reputation: 4359

Retrieving the CURL authentication server-side

I'm setting a CURL authentication, using CURLOPT_USERPWD:

curl_setopt($curl_handle, CURLOPT_USERPWD, $login); // Authenticate

How can I access this value server-side, so I can check it?

Upvotes: 1

Views: 659

Answers (2)

Dirk
Dirk

Reputation: 21

$_SERVER['PHP_AUTH_PASS'] should be $_SERVER['PHP_AUTH_PW']

Upvotes: 2

Your Common Sense
Your Common Sense

Reputation: 157889

if you're talking of HTTP Basic Authorization, PHP store it credentials in the $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PASS']

Or you can use web-server config to check this password.

Upvotes: 3

Related Questions