dev-master 2017-01-27 15:00 UTC

This package is not auto-updated.

Last update: 2025-06-22 00:57:31 UTC


README

enter image description here

This library provides an object-oriented wrapper of the PHP cURL extension.

If you have questions or problems with installation or usage create an Issue.

Installation

In order to install this library via composer run the following command in the console:

composer require assistant/curl

Usage examples

$curl=new Assistant\Curl();
$curl->get('https://httpbin.org/get');
$curl=new Assistant\Curl();
$curl->get('https://httpbin.org/get','first_name=Semih&last_name=Aydemir');
$curl=new Assistant\Curl();
$curl->post('https://httpbin.org/post');
$curl=new Assistant\Curl();
$curl->post('https://httpbin.org/post','first_name=Semih&last_name=Aydemir');
$curl=new Assistant\Curl();
$curl->request('get','https://httpbin.org/post','first_name=Semih&last_name=Aydemir');
$curl=new Assistant\Curl();
$curl->request('post','https://httpbin.org/post','first_name=Semih&last_name=Aydemir');

Available methods

  • $curl->setLink();
  • $curl->getLink();
  • $curl->setHeader();
  • $curl->getHeader();
  • $curl->setHeaders();
  • $curl->getHeaders();
  • $curl->setUserAgent();
  • $curl->getUserAgent();
  • $curl->setProxy();
  • $curl->getProxy();
  • $curl->setFollowLocation();
  • $curl->getFollowLocation();
  • $curl->setAutoReferer();
  • $curl->getAutoReferer();
  • $curl->setTimeOut();
  • $curl->getTimeOut();
  • $curl->setParams();
  • $curl->getParams();
  • $curl->getResponse();
  • $curl->getErrorMessage();
  • $curl->getErrorNo();
  • $curl->getInfo();
  • $curl->isSuccess();
  • $curl->curl2string();
  • $curl->log();
  • $curl->get();
  • $curl->post();
  • $curl->request();