2017 © Pedro Peláez
 

library curl

Curl

image

wangta69/curl

Curl

  • Tuesday, June 5, 2018
  • by wangta69
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 100 % Grown

The README.md

curl

Installation

composer require wangta69/curl

composer require "wangta69/curl @dev"

How to Use

use Pondol\Curl\CurlService;

$body = ['name'=>'pondol'];
$headers = ['Connection: Keep-Alive', 'Content-type: application/x-www-form-urlencoded;charset=UTF-8'];

$headers[] = 'Host: shop-wiz.com'];
$headers[] = 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0'];
$headers[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'];
$headers[] = 'Accept-Language: en-US,en;q=0.5'];
$headers[] = 'Accept-Encoding: gzip, deflate'];//#remove this line for readable/greppable formatting
$headers[] = 'Content-Encoding: gzip';//Transfer-Encoding
$headers[] = 'Referer: https://shop-wiz.com/tmp.php'];
$headers[] = 'Cookie: all required cookies will appear here'];
$headers[] = 'Connection: keep-alive'];


$curl = new CurlService();
$curl->request('GET', 'http://www.shop-wiz.com', ['body'=>$body, 'headers'=>$headers]);
echo $curl->body();


$curl = new CurlService();
$curl->request('POST', 'http://www.shop-wiz.com', ['body'=>$body, 'headers'=>$headers]);
echo $curl->body();

-- Cookie
$curl = new CurlService();
$curl->request('GET', 'http://www.shop-wiz.com', ['cookies'=>true]);
$curl->request('GET', 'http://www.shop-wiz.com', ['cookies'=>['filepath'=>'/tmp/my_cookie_file']]);
echo $curl->body();

Request Json

use Pondol\Curl\CurlService;

$body = json_encode(['name'=>'pondol']);

$curl = new CurlService();
$curl->requestJson('POST', 'http://www.shop-wiz.com', ['body'=>$body, 'headers'=>$headers]);
echo $curl->body();

The Versions

05/06 2018

dev-master

9999999-dev

Curl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Pondol

laravel curl pondol

08/02 2018

1.0.2

1.0.2.0

Curl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Pondol

laravel curl pondol

02/02 2018

1.0.1

1.0.1.0

Curl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Pondol

laravel curl pondol

02/02 2018

1.0.0

1.0.0.0

Curl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Pondol

laravel curl pondol