smt/buzz-realmed-curl-client
BuzzBrowser cURL客户端,支持http-realm身份验证
v1.0.2
2015-12-21 15:49 UTC
Requires
- php: >=5.5
- kriswallsmith/buzz: 0.*
This package is not auto-updated.
Last update: 2024-09-18 09:33:12 UTC
README
Buzz Browser cURL客户端,支持http-realm身份验证。
安装
composer require smt/buzz-realmed-curl-client
就是这样!
使用方法
<?php
use Smt\Buzz\Client\RealmedCurlClient;
use Buzz\Browser;
$client = new RealmedCurlClient('username', 'password');
$client->setAuthenticationMethod(RealmedCurlClient::AUTH_NTLM);
$browser = new Browser($client);
$browser->get(/* ... */);
可用的身份验证方法
RealmedCurlClient::AUTH_ANY
- cURL "任何" 身份验证方法;RealmedCurlClient::AUTH_BASIC
- 基本身份验证方法;RealmedCurlClient::AUTH_NTLM
- NTLM身份验证方法;RealmedCurlClient::AUTH_DIGEST
- Digest身份验证方法;RealmedCurlClient::AUTH_NEGOTIATE
- Negotiate身份验证方法;
更多内容请参阅 Buzz Browser