blar / curl
This package is abandoned and no longer maintained.
No replacement package was suggested.
Curl for PHP
dev-master
2017-01-07 09:03 UTC
Requires
- php: ^7.0
- ext-curl: *
- blar/credentials: dev-master
- blar/hash: dev-master
- blar/sockets: dev-master
Requires (Dev)
- blar/openssl: dev-master
- satooshi/php-coveralls: ^1.0
Suggests
- blar/openssl: Validate remote certificates
- blar/sqlite: Store Cookies and Pins in SQLite
This package is auto-updated.
Last update: 2018-09-29 14:21:11 UTC
README
OOP-Wrapper für Curl
Anfrage erstellen
$curl = new Curl();
$curl->setUrl('http://www.example.com/');
$response = $curl->execute();
POST versenden
$curl = new Curl();
$curl->setMethod('POST');
$curl->setUrl('http://www.example.com/');
$curl->setBody(array(
'foo' => 23,
'bar' => 42
));
$response = $curl->execute();
Verbindung über Proxy erstellen
$curl = new Curl();
$curl->setUrl('http://www.example.com/');
$socket = new NetworkSocket('proxy.example.com', 3128);
$proxy = new CurlProxy($socket);
$curl->setProxy($proxy);
$response = $curl->execute();
Verbindung über Proxy mit Zugangsdaten erstellen
$curl = new Curl();
$curl->setUrl('http://www.example.com/');
$proxy = new CurlProxy();
// Adresse und Port des Proxyservers
$socket = new NetworkSocket('proxy.example.com', 3128);
$proxy->setSocket($socket);
// Zugangsdaten für den Proxyserver
$credentials = new BasicCredentials('userName', 'password');
$proxy->setCredentials($credentials);
$curl->setProxy($proxy);
$response = $curl->execute();
Installation
Abhängigkeiten
Abhängigkeiten von blar/curl auf gemnasium anzeigen
Installation per Composer
$ composer require blar/curl
Installation per Git
$ git clone https://github.com/blar/curl.git