Download the PHP package wykleph/curl without Composer

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

Curler

A fluent API wrapper for libcurl in php. Setting options and headers is done using method chaining instead of setting options explicitly using the libcurl constants.

Debugging cURL commands in php using the Curler class is insanely simple as well. Just chain the dryRun() method onto the end of your method chain instead of the go() method and it will dump out all of the cURL request information without making the request.

See http://php.net/manual/en/book.curl.php for information on libcurl.

Note: This library is in its infancy.

Full documentation coming soon.

Getting Started

Install using Composer

Add wykleph/curl to your composer.json file or:

composer require "wykleph/curl"

You could also just copy the files in the src directory into your project if you aren't using composer, however I would recommend it.

Creat the Curler instance.

Note that all of the following methods can be chained together unless noted otherwise

Post information
Switch From POST to a GET request
Set Headers
Set User Agent or Referer
Save Cookies
Follow Browser Redirects
Compressed Responses

You can tell Curler you expect a compressed response from the request with compressedResponse().

Upload a File

Just give a form input name and a filepath.

Verbose Output
Write Response to File

multi-request support coming soon.

Preforming an Asynchronous Request, or Multi-Request

You can send asynchronous requests as well! This can be accomplished through the use of AsyncCurler by adding URLs to the request(this retains any options that have been set in AsyncCurler up to this point), or by adding cURL handles to the request(adding handles as opposed to urls is somewhat untested.
It's in the works though).

Debugging a request

Debug requests with ease by chaining the dryRun() method to the end of your method chain and dumping the result.

This will output something similar to this(consider using something like Symfony's VarDumper or Laravels dump and die - dd()):


All versions of curl with dependencies

PHP Build Version
Package Version
No informations.
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 wykleph/curl contains the following files

Loading the files please wait ....