Download the PHP package 0x1881/curl without Composer

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

PHP Curl

en tr

This package can send HTTP requests to a given site using Curl.

It provides functions that can take several types of parameters to configure an HTTP request to that the class will send to an HTTP api.

After setting all the parameters, the class can execute sending of the configured HTTP request.

Coded for educational purposes. The user is responsible for the abuse.


Install


Using


Methods

Request Methods

Response Methods

Other Methods

Constants

Detailed Description of Methods

Details of Request Methods

setDefault()

Returns the class to its default request settings. It resets the settings to default on every request made.


setMethod()

Used to specify the request type.

Kabul edilen türler


setUrl()

Specifies the destination of the request.


setHeader()

Adds header to the request.

or

or


setBody()

Adds body to the request. Applies to certain request methods.

Raw: The specified body is set for the request as direct plain text.

Query 1: Sets a body of content type . Added as an example comment. If the data is of type array, the method will convert it to the format we specified.

Query 2: Sets a body of content type . Added as an example comment.

Json: Sets a body in format. Added as an example comment.


setOpt()

It is the method that makes the curl_setopt method of the curl library practical. CURLOPT constants can be used optionally.


setDebug()

It sets the constant CURLOPT_VERBOSE from the curl library to true, so it returns optional debug data on terminal lines. The default false is off.


setUserAgent()

Sets the User-Agent header of the request.


setCookie()

Adds the specified cookie information to the Cookie header of the request.

or

or


setCookieFile()

It takes the cookie data from the file with the cookie information in Netscape format and adapts it to the request.


setCookieJar()

It adds and saves the cookie information in Netscape format to the specified file.


setFollow()

Used to allow if the request is redirecting. The default false is off.


setReturn()

Allows the request transfer to be output or not. The default false is off.


setReferer()

Sets the Referer header to use in the request.


setAutoReferer()

If the request has redirected, it automatically sets the Referer header to be used in the request. The default false is off.


setTimeout()

Sets the timeout of curl functions in seconds.


setConnectTimeout()

Sets the attempt time, in seconds, of the request.


setMaxConnect()

Sets the maximum number of simultaneous connections.


setMaxRedirect()

Sets the maximum number of redirects. The default value is 20.


setProxy()

It allows the request to be connected via proxy. It can auto parse. Only the 1st argument should be used when auto-parsing. It uses the default HTTPS proxy type.

veya (oto ayrıştılır)

or proxy type can be specified. (auto parse)

or authentication with username and password. (auto parse)


setProxyType()

It determines the proxy type while allowing the request to be connected via proxy. Curl constants must be used.


setProxyAuth()

It sets the proxy authentication information while allowing the request to connect via proxy.

or

or


send()

It is the function where requests are made. It is used to implement request methods. All request methods in the class send requests using this method.

or


get()

Sends a request using the GET request method. This request does not accept the request body.

veya

veya


post()

It sends a request using the POST request method. This request accepts the request body. The setBody method is valid for all request methods that can be sent body.


put()

Throws a request using the PUT request method. This request accepts the request body. The setBody method is valid for all request methods that can be sent body.


put()

It sends a request using the PUT request method. This request accepts the request body. The setBody method is valid for all request methods that can be sent body.


delete()

It assigns a request using the DELETE request method. This request accepts the request body. The setBody method is valid for all request methods that can be sent body.


patch()

It assigns a request using the PATCH request method. This request accepts the request body. The setBody method is valid for all request methods that can send a body.


head()

It assigns a request using the HEAD request method. This request does not accept body and does not return a response.


connect()

It assigns a request using the CONNECT request method. This request does not accept the request body.


options()

It assigns a request using the OPTIONS request method. This request does not accept the request body.


trace()

It assigns a request using the TRACE request method. This request does not accept body and does not return a response.


exec()

Running this method is mandatory after setting up any request. The request is not sent until the ``exec``` method is appended to the end of the request. This class works with the logic in the curl library. The reason for necessity is to make it easier to check the settings without sending the request.

for setting check, print $curl variable with print_r method without adding exec.

Details of Response Methods

getInfo()

It is a method that returns detailed information about curl that occurs after sending a curl request.

All information can be directly returned as array type.

or it can also return singular information.


getCurlError()

If a curl-based error occurs after sending the request, this method returns the error.


getResponse()

Returns the response from the request.

or you can return it by deleting the extra spaces in the answer.


getRespJson()

If the response received from the request is in json format, it returns the json data by parsing it. The return type is object. Array type can also be set.

or return json data as array.

Can set flag for json_decode with 2nd argument.


getEffective()

If the request has a redirect, it returns the last source visited. For this, the setReturn method must be set to true.


getHttpCode()

Returns the http status code of the request.


getHeader()

Returns any header returned from the request. Returns a singular value. The header id is added to the second argument. The header id argument returns data from the headers of the default last request.

or if there is a redirect, header can also be taken from the previous request. The header id is entered in the second argument.


getHeaders()

Returns all headers returned from the request. Array returns value. The header id is added to the first argument. The header id argument returns data from the headers of the default last request.

or


getCookie()

Returns the specified cookies returned from the request response. The header id is valid in the 2nd argument.

or


getCookiesRaw()

Returns the cookies returned from the request in cookie format. header id is valid in 1st argument.

or


getCookiesArray()

Returns the cookies returned from the request. The header id is valid in the 1st argument. As the name suggests, the returned data type is array.

or


getBetween()

Finds and returns text in the specified range from the response received from the request. Returns singular string data.

The 3rd argument is equal to the 1st argument of the getResponse method. It deletes the extra spaces in the response.


getBetweens()

Finds and returns text in the specified range from the response received from the request. Returns multiple array data. Gets all of the specified ranges if more than one.

The 3rd argument is equal to the 1st argument of the getResponsemethod. It deletes the extra spaces in the response.


Details of Other Methods

find()

It performs a text search in the response of the request, and returns an object type result if any. You can search for singular information as well as plural. The default source is the data retrieved from the getResponse method. Different source can be added to the optional 2nd argument.

title tag check

or multiple searches.

or a different source can be added.


getOpt()

Returns the values ​​of constants set with the setOpt method. Names do not contain the names of constants. This is how the curl library offers.

or


Details of Constants

RAW

It allows it to detect the body data to be sent in the request as plain text.


JSON

It makes it detect the body data to be sent in the request as json and converts it to json data.


QUERY

It makes it detect the body data to be sent in the request as a form and converts it to form data.



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 0x1881/curl contains the following files

Loading the files please wait ....