Download the PHP package geronimo794/php-simple-curl-class without Composer
On this page you can find all versions of the php package geronimo794/php-simple-curl-class. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download geronimo794/php-simple-curl-class
More information about geronimo794/php-simple-curl-class
Files in geronimo794/php-simple-curl-class
Package php-simple-curl-class
Short Description Simple curl class helper
License MIT
Informations about the package php-simple-curl-class
PHP Simple Curl Class
Version 1.0.0
Php class to make simple curl request. Can use as code igniter library or as php class.
Geting started
- As PHP Class
Step 1 : Download the curl class here here
Step 2 : Include or require the curl class in your php file
Step 3 : Create object from curl class
Step 4 : Set the url of curl request
Step 5 : Set the GET/POST parameter to send via curl
OR
Step 6 : Set the user_agent of curl
Step 7 : Get the curl response
- As Code Igniter Library
Step 1 : Download the curl class here here
Step 2 : Put the class file to Code Igniter library
Step 3 : Load curl library in your controller
Step 4 : Set the url of curl request
Step 5 : Set the GET/POST parameter to send via curl
OR
Step 6 : Set the user_agent of curl
Step 7 : Get the curl response
Avaible methods
- clear() : Clear all the given setting to curl object
- setUrl( $url ) : Set the url of curl request
- setUserAgent( $userAgent ) : Set useragent
- setPostData( $name, $value ) : Set the post data
- setPostData( array( $name => $value ) ) : Set the post data
- setGetData( $name, $value ) : Set the get data
- setGetData( array( $name => $value ) ) : Set the get data
- getResponse() : Get response from curl
- setOption( array( CURL_OPT => CURL_OPT_VAL ) ) (06-12-2016) : Set the additional value for curl options with array
- setOption( CURL_OPT, CURL_OPT_VAL ) (06-12-2016) : Set the additional value for curl options with single option and value New method Version 1.2.0
- setHeaderData( array( $name => $value ) ) : Set header data for the curl request with array
- setHeaderData( $name, $value ) : Set header data for the curl request with name and value of header data
- setBody( $requestBody ) : Set the body of the curl request, it's usefull when you want to send json data through request body
- setRequestMethod( $requestMethod ) : Set curl request method it can be GET, POST, PUT, DELETE
- getInstance() : Get the current instance of the curl for the multiple curl request
- getResponseMultiInit( $curlInstance = [] ) : Its use for curl multiple instance initiation request, so you can multiple curl request at once
Changelogs
Version 1.0.0
- setData, setUrl, setUserAgent, clear, getResponse.
Version 1.0.1 (06-12-2012)
- Add new method setOption.
Version 1.2.0 (24-03-2018)
- Add new method setHeaderData, setBody, setRequestMethod, getInstance, and getResponseMultiInit.