Download the PHP package webiik/curlhttpclient without Composer

On this page you can find all versions of the php package webiik/curlhttpclient. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package curlhttpclient

CurlHttpClient

The CurlHttpClient allows to easily send HTTP request via cURL.

Installation

Example

Summary

CurlHttpClient

CurlHttpClient prepares cURL requests represented by CurlHttpClientReq, sends cURL requests and receives cURL responses represented by CurlHttpClientRes. It allows you to send asynchronously multiple requests at once.

prepareRequest

prepareRequest() creates object CurlHttpClientReq which represents set of cURL options.

send

send() sends cURL request using the options defined in CurlHttpClientReq, returns CurlHttpClientRes.

sendMulti

sendMulti() sends asynchronously multiple cURL requests at once. Once all requests are completed, it receives array of CurlHttpClientRes.

CurlHttpClientReq

CurlHttpClientReq represents set of cURL options. It provides many methods to easily add most common cURL options.

Connection settings


url

url() sets URL to connect to.

method

method() sets connection method e.g. GET, POST...

port

port() sets port to connect to.

followLocation

followLocation() sets to follow redirects.

auth

auth() sets authentication credentials.

proxy

proxy() set proxy to connect through.

verifySSL

verifySSL() sets to check SSL connection or not.

connectTimeout

connectTimeout() sets cURL connection timeout. 0 - wait indefinitely.

executionTimeout

executionTimeout() set cURL transfer timeout. 0 - never quit during transfer.

lowSpeedLimit

lowSpeedLimit() disconnects cURL if it's slower than $bytes/sec for $sec seconds.

Data To Send


userAgent

userAgent() sets user agent HTTP header.

referrer

referrer() sets referrer HTTP header.

header

header() sets HTTP header in format e.g. 'Content-type: image/jpeg'.

headers

headers() sets array of HTTP headers in format e.g. ['Content-type: image/jpeg',...]

mimicAjax

mimicAjax() sets HTTP header to mimic ajax.

cookie

cookie() sets 'Cookie' HTTP header.

cookieFile

cookieFile() sets cookie(s) from file.

cookieJar

cookieJar() catches response cookie(s) to file.

resetCookie

resetCookie() sets cURL to ignore all previous cookies.

postData

postData() adds post data to cURL request.

upload

upload() sets cURL to upload local file to remote server. $file is local file to be uploaded to remote server.

uploadSpeedLimit

uploadSpeedLimit() sets max upload speed in bytes per second.

Data To Receive


encoding

encoding() sets response encoding. Supported encodings are "identity", "deflate", and "gzip".

receiveBody

receiveBody() determines to receive response body or not.

receiveHeaders

receiveHeaders() determines to receive response headers or not.

receiveAsString

receiveAsString() sets cURL to return cURL response as a string instead of outputting it directly.

downloadToServer

downloadToServer() sets cURL to download remote file to local server. $file is used as a storage of remote file.

downloadToClient

downloadToClient() sets cURL to stream remote file to client.

downloadSpeedLimit

downloadSpeedLimit() sets max download speed in bytes per second.

Custom


verbose

verbose() sets cURL to receive verbose response info.

curlOption

curlOption() sets a cURL option.

curlOptions

curlOptions() sets an array of cURL options.

progressFile

progressFile() sets a file to store download/upload progress to. Progress is stored in JSON format.

progressJson

progressJson() sets cURL to print upload/download progress as a JSON (without content-type header).

CurlHttpClientRes

CurlHttpClientRes represents cURL response. It provides methods to easily access most common response informations.

header

header() gets response header by header name.

Parameters

headers

headers() gets array of all response headers.

cookie

cookie() gets response cookie value by cookie name.

Parameters

cookies

cookies() gets array of all response cookie headers.

cookiesAssoc

cookiesAssoc() gets associative array of all response cookies.

body

body() gets response body.

size

size() gets response size in bytes.

mime

mime() gets response content type.

statusCode

statusCode() gets response HTTP status code.

errMessage

errMessage() gets cURL error message.

errNum

errNum() gets cURL error number.

isOk

isOk() indicates if cURL request was ok.

info

info() gets cURL info array.

requestHeaders

requestHeaders() gets array of all request headers.

requestCookies

requestCookies() gets array of all request cookie headers.

Resources


All versions of curlhttpclient with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webiik/curlhttpclient contains the following files

Loading the files please wait ....