Skip to content
This repository was archived by the owner on Sep 1, 2025. It is now read-only.

Repository files navigation

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 badge

Travis-ci

codecov badge

codecov

Github badge

DownloadsSizetaglicenselanguages

Installation

Use Composer to install the library. Of course, You can go to Packagist to view.


$ composer require yakeing/php_curl

init

  • example
$Curl = newcurl();
$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'=>newCURLFile(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);

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.

Sponsor

Author

weibo: yakeing

twitter: yakeing

About

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.

Topics

Resources

Stars

36 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages