2017 © Pedro Peláez
 

library curl

A http(s) client of php

image

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

The README.md

A simple php Http Client

  • Usage
    $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

  • construct options
    $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',
        ........
    ];

The Versions

01/06 2017

dev-master

9999999-dev

A http(s) client of php

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Mrj