library curl
A http(s) client of php
mrjnamei/curl
A http(s) client of php
- Thursday, June 1, 2017
- by 735416909
- Repository
- 1 Watchers
- 0 Stars
- 0 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
A simple php Http Client
$options = [] ;
$http = new mrjnamei\Curl($options);
// http get
$url = "http://www.google.com";
$res = $http->get($url,["name" => "jack"]); // $res is the response
$res = $http->post($url,["name" => "jack"]); // post request
$options = [
'base_path' => 'http://www.google.com/' , //base path
'headers' => [
'Content-Type' => 'text/html;charset=utf-8',
],
'CURLOPT_CONNECTTIMEOUT' => 30 , //timeout
'CURLOPT_SSL_VERIFYPEER' => true , // use ssl
'CURLOPT_CAINFO' => 'path/to/cert.pem',
........
];
dev-master
9999999-dev
A http(s) client of php
Sources
Download
MIT
The Requires
by
Mrj