/php_curl

Curl is an open source file transfer tool that uses URL syntax to work on the command line, where the basic functions of curl are encapsulated, such as COOKIES / encrypted transport / HTTP authentication / analog forms / upload files, etc.

Primary LanguagePHPMozilla Public License 2.0MPL-2.0

php_curl

Curl is an open source file transfer tool that uses URL syntax to work on the command line, where the basic functions of curl are encapsulated, such as COOKIES / encrypted transport / HTTP authentication / analog forms / upload files, etc.

Travis CI

Travis-ci

codecov

codecov

Packagist

Version Downloads

Github

Downloads Size tag Language Php

Installation

Use Composer to install the library.


    $ composer require yakeing/php_curl

init

  • example
    $Curl = new curl();
    $curl->Encoding = 'gzip';
    $Curl->Timeout = 10;

GET

  • example
      $Url = 'https://github.com/yakeing';
      $Header = array(
        'User-Agent: Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.28'
      );
      $Curl->Get($Url, $Header);

POST

  • example
      $Url = 'https://github.com/yakeing';
      $Vars = array(
        'user'=>'admin',
        'upload'=>new CURLFile(realpath('image.jpg')) //php 5.5 Edition
        );
      $curl->UserAgent = 'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.28';
      $Curl->Post($Url, $Vars, $Header);

Donate

If you've got value from any of the content which I have created, then I would very much appreciate your support by payment donate.

Bitcoin

1FYbZECgs3V3zRx6P7yAu2nCDXP2DHpwt8

Bitcoin

WeChat

WeChat

Alipay

Alipay

Author

weibo: yakeing

twitter: yakeing