2017 © Pedro Peláez
 

package zcurl

`A simple CurlHelper

image

zzzep/zcurl

`A simple CurlHelper

  • Wednesday, June 6, 2018
  • by zzzep
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

CurlHelper

PHP Curl Helper, (*1)

Usage:, (*2)

GET:

    $curl = new CurlHelper();

    $response = $curl->init()->response("http://example.com");


POST:

    $curl = new CurlHelper();

    $arrayOfParams = array(
        'param1' => 'value1',
        'param2' => 'value2',
    );

    $response = $curl->init()->setPost($arrayOfParams)->response("http://example.com");

PUT:

    $curl = new CurlHelper();

    $arrayOfParams = array(
        'param1' => 'value1',
        'param2' => 'value2',
    );

    $response = $curl->init()->setPost($arrayOfParams)->response("http://example.com");     


How to set Header (optional):

    $curl = new CurlHelper();

    $headers = array(
        'Content-type: application/json',
        'Authorization: Auth123',
    );

    $response = $curl->setHeader($headers)->response("http://example.com");

The Versions

06/06 2018

dev-master

9999999-dev

`A simple CurlHelper

  Sources   Download

MIT

by Giuseppe Fechio

06/06 2018

1.0.1

1.0.1.0

`A simple CurlHelper

  Sources   Download

MIT

by Giuseppe Fechio