����JFIF��x�x����'
| Server IP : 78.140.185.180 / Your IP : 216.73.216.169 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/./././public_html/vendor/guzzle/guzzle/docs/plugins/ |
Upload File : |
==========================
cURL authentication plugin
==========================
.. warning::
The CurlAuthPlugin is deprecated. You should use the `auth` parameter of a client to add authorization headers to
every request created by a client.
.. code-block:: php
$client->setDefaultOption('auth', array('username', 'password', 'Basic|Digest|NTLM|Any'));
If your web service client requires basic authorization, then you can use the CurlAuthPlugin to easily add an
Authorization header to each request sent by the client.
.. code-block:: php
use Guzzle\Http\Client;
use Guzzle\Plugin\CurlAuth\CurlAuthPlugin;
$client = new Client('http://www.test.com/');
// Add the auth plugin to the client object
$authPlugin = new CurlAuthPlugin('username', 'password');
$client->addSubscriber($authPlugin);
$response = $client->get('projects/1/people')->send();
$xml = new SimpleXMLElement($response->getBody(true));
foreach ($xml->person as $person) {
echo $person->email . "\n";
}