Download the PHP package net_bazzline/php_component_curl without Composer
On this page you can find all versions of the php package net_bazzline/php_component_curl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download net_bazzline/php_component_curl
More information about net_bazzline/php_component_curl
Files in net_bazzline/php_component_curl
Package php_component_curl
Short Description free as in freedom simple object oriented curl request and response component (YACC - yet another curl component)
License LGPL-3.0
Informations about the package php_component_curl
Simple Curl Wrapper Component for PHP
This project aims to deliver an easy to use and free as in freedom object oriented php curl command component.
The build status of the current master branch is tracked by Travis CI:
Take a look on openhub.net.
The current change log can be found here.
This component is not developed to replace guzzle.
Example
By Using The Builder
By Using The Request
Executable Examples
More Examples
Post Request With Basic Authentication
Terms
- Dispatcher
- doing the curl request
- if you want to use pure curl, use this class
- Request
- object oriented approach reflecting the request
- HeadLine
- object oriented http headers (list of available headers), start a pull request if you need more
- Options
- object oriented curl options, start a pull request if you need more
- Parameters
- all the parameters you want to add to your url - they are urlencoded automatically
- Url
- the url of your endpoint
- Response
- object oriented approach reflecting the response
- ResponseBehaviour
- interface to interact with the response
- either modify the response (by creating a new one)
- change the flow by throwing an exception if the response does not fits your needs (as example)
- interface to interact with the response
- Builder
- provides a fluent interface to easy up using curl
- it takes care of all :-)
Not Available Curl Options
In general, the php version is limiting the available curl options. Furthermore, some options are not implemented because of their hardcoded usage in the Response or the Dispatcher (you can set it but they would be overwritten).
This options are:
- used in the Request
- CURLOPT_CUSTOMREQUEST
- CURLOPT_HTTPHEADER
- CURLOPT_POSTFIELDS
- used in the Dispatcher
- CURLINFO_HEADER_OUT
- CURLOPT_HEADERFUNCTION
- CURLOPT_RETURNTRANSFER
If you want to change this, you either have to extend the existing Request or Dispatcher object.
Install
By Hand
With Packagist
Links
Other Components Available
- https://github.com/php-mod/curl
- https://github.com/anlutro/php-curl
- https://github.com/hamstar/curl
- https://github.com/jyggen/curl
- https://github.com/ixudra/Curl
- https://github.com/brodkinca/BCA-PHP-CURL
- https://github.com/miliqi/laravel-curl
- https://github.com/andrefigueira/Lib-Curl
Final Words
Star it if you like it :-). Add issues if you need it. Pull patches if you enjoy it. Write a blog entry if you use it. Donate something if you love it :-].