2017 © Pedro Peláez
 

library simple-curl-connector

Simple CURL library for PHP

image

abibockun/simple-curl-connector

Simple CURL library for PHP

  • Sunday, November 5, 2017
  • by abibockun
  • Repository
  • 0 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Simple CURL PHP Connector

A little tool for making CURL requests

Installation

Simply add a package:, (*1)

composer require abibockun/simple-curl-connector

Usage

Add Namespace:, (*2)

use Abibockun\SimpleCurlConnector\SimpleCurlConnector;

Create new Instance and add Settings:, (*3)

$curl = new SimpleCurlConnector();
$curl->setEndPointBaseUrl('YOUR TARGET URL BASE');

Optionally you have option to pass Extra headers, example:, (*4)

$curl->setExtraHeaders([
    CURLOPT_HEADER => false,
    CURLOPT_HTTPHEADER => ["Accept: application/json"],
    CURLOPT_SSL_VERIFYPEER => false
]);

Make a call to any API or Just URL, (*5)

$results = $curl->send('YOUR URI TO API');

Default Method is GET, you can use POST, PATCH, DELETE List of parameters for "send" function:, (*6)

$requestType = 'GET|POST|PATCH|DELETE', 
$data = [], array of data, supported only one-dimensional arrays
$dataJson = false, Flag in what format your data is.
$returnObject = true, By Default it returns Parsed JSON to an Object.

The Versions

05/11 2017

dev-master

9999999-dev https://github.com/Abibockun/simple-curl-connector

Simple CURL library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

curl

05/11 2017

v1.0.1

1.0.1.0 https://github.com/Abibockun/simple-curl-connector

Simple CURL library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

curl

05/11 2017

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/Abibockun/simple-curl-connector

Simple CURL library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

curl

05/11 2017

v1.0.0

1.0.0.0 https://github.com/Abibockun/simple-curl-connector

Simple CURL library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

curl