PHP Curl Class

Content

PHP Curl Class: an object-oriented wrapper for curl functions. Supports REST request methods: GET, POST, PUT, PATCH, and DELETE. Examples:

require __DIR__ . '/vendor/autoload.php';   $curl = new Curl(); $curl->setUserAgent('SomeBot (+https://www.example.com/bot.html)'); $curl->get('https://www.example.com/');   if ($curl->error) {     echo 'Error: ' . $curl->errorCode . ': ' . $curl->errorMessage; } else {     echo $curl->response; }   var_dump($curl->requestHeaders); var_dump($curl->responseHeaders);

More examples and download at https://github.com/php-curl-class/php-curl-class

Posted . Did this help you? Please let me know with a comment. Thank you

Comments (RSS)

  1. Test name

    Test comment