Download the PHP package powderblue/curl without Composer

On this page you can find all versions of the php package powderblue/curl. 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 curl

Curl

A basic cURL wrapper for PHP.

:information_source: See https://www.php.net/curl for more information about the cURL extension for PHP

This fork is a modernised, and maintained, version of @shuber's rather nice, simple cURL wrapper.

Installation

Use Composer.

Usage

Initialization

Simply require and initialize the Curl class like so:

Performing a Request

The Curl class provides shortcuts for making requests using the HEAD, GET, POST, PUT, and DELETE methods. You must always specify a URL; you can also pass an array/string of variables to send along with it, if need be.

Use Curl::request() to make a request using a custom request-method, thus:

Examples:

All requests return an instance of PowderBlue\Curl\Response if successful, or throw an exception if an error occurs.

The Response Class

A normal cURL request returns the headers and body in a single string. The PowderBlue\Curl\Response class splits that string, placing the two parts in separate properties.

For example:

Would display something like:

:information_source: PowderBlue\Curl\Response::__toString() returns the response body, so—for example—echo $response will output the same as echo $response->body.

Cookies/Sessions

By default, cookies will be stored in <lib-dir>/var/curl_cookie.txt. You can change this by doing something like the following.

This allows you to maintain a session across requests.

Basic Configuration Options

You can easily set the referer or user-agent:

Setting Headers

You can specify headers to send with the request:

Setting Custom cURL Request Options

By default, redirects will be followed. You can disable this with:

If you need to do something a little more exotic, you can set/override cURL options like this:

:information_source: See the curl_setopt() documentation for a list of cURL request options

Get in Touch

Problems, comments, and suggestions are all welcome: [email protected].


All versions of curl with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.27
ext-curl Version *
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 powderblue/curl contains the following files

Loading the files please wait ....