2017 © Pedro Peláez
 

library curl

Custom PHP Curl library for the Laravel 5 framework - developed by xiaojiays

image

xiaojiays/curl

Custom PHP Curl library for the Laravel 5 framework - developed by xiaojiays

  • Wednesday, October 28, 2015
  • by xiaojiays
  • Repository
  • 1 Watchers
  • 4 Stars
  • 185 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 24 % Grown

The README.md

laravel-curl

a curl extension for laravel 5, (*1)

Install

add this to the composer.json file:, (*2)

{
    "require": {
        "xiaojiays/curl": "~0.3.0"
    }
}

add this to the config/app.php file:, (*3)

'providers' => [
    Xiaojiays\Curl\CurlServiceProvider::class,
],

add this to the config/app.php file:, (*4)

'facades' => [
    'Curl' => Xiaojiays\Curl\Facades\Curl::class,
],

Usage

//send a get request
\Curl::get('http://www.xx.com');

//send a get request in 2 seconds
\Curl::getInSeconds('http://www.xx.com', 2);

//send a get request in 2 milliseconds
\Curl::getInMilliseconds('http://www.xx.com?a=1', 2)

//send a post request
\Curl::post('http://www.xx.com', ['a' => 1, 'b' => 2]);

//send a post request in 2 seconds
\Curl::postInSeconds('http://www.xx.com', ['a' => 1, 'b' => 2], 2);

//send a post request in 2 milliseconds
\Curl::postInMillieconds('http://www.xx.com', ['a' => 1, 'b' => 2], 2);

//download a file
\Curl::download('http://www.xx.com', '1.html');

//send multi get requests
\Curl::multiGet(['http://www.xx.com', 'http://www.mm.com']);

Notice

I haven't test it!

The Versions

28/10 2015

dev-master

9999999-dev https://github.com/xiaojiays/curl

Custom PHP Curl library for the Laravel 5 framework - developed by xiaojiays

  Sources   Download

MIT

The Requires

 

by Avatar xiaojiays

laravel curl

28/10 2015

0.3.0

0.3.0.0 https://github.com/xiaojiays/curl

Custom PHP Curl library for the Laravel 5 framework - developed by xiaojiays

  Sources   Download

MIT

The Requires

 

by Avatar xiaojiays

laravel curl