Download the PHP package bayfrontmedia/php-http-request without Composer

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

PHP HTTP request

Easily handle data from incoming HTTP requests.

License

This project is open source and available under the MIT License.

Author

Bayfront Media

Requirements

Installation

Usage

Request methods

Data types

Specific values


validateMethod

Description:

Returns valid request method with a fallback to GET.

Valid request methods include:

Parameters:

Returns:

Example:


getMethod

Description:

Returns current request method.

Parameters:

Returns:

Example:


isConnect

Description:

Is current request method CONNECT.

Parameters:

Returns:

Example:


isDelete

Description:

Is current request method DELETE.

Parameters:

Returns:

Example:


isGet

Description:

Is current request method GET.

Parameters:

Returns:

Example:


isHead

Description:

Is current request method HEAD.

Parameters:

Returns:

Example:


isOptions

Description:

Is current request method OPTIONS.

Parameters:

Returns:

Example:


isPatch

Description:

Is current request method PATCH.

Parameters:

Returns:

Example:


isPost

Description:

Is current request method POST.

Parameters:

Returns:

Example:


isPut

Description:

Is current request method PUT.

Parameters:

Returns:

Example:


isTrace

Description:

Is current request method TRACE.

Parameters:

Returns:

Example:


getFile

Description:

Returns value of single $_FILES array key in dot notation or entire array, with optional default value.

Parameters:

Returns:

Example:


hasFile

Description:

Checks if $_FILES array key exists in dot notation.

Parameters:

Returns:

Example:


getQuery

Description:

Returns value of single $_GET array key in dot notation or entire array, with optional default value.

Parameters:

Returns:

Example:


hasQuery

Description:

Checks if $_GET array key exists in dot notation.

Parameters:

Returns:

Example:


getPost

Description:

Returns value of single $_POST array key in dot notation or entire array, with optional default value.

Parameters:

Returns:

Example:


hasPost

Description:

Checks if $_POST array key exists in dot notation.

Parameters:

Returns:

Example:


getServer

Description:

Returns value of single $_SERVER array key in dot notation or entire array, with optional default value.

Parameters:

Returns:

Example:


hasServer

Description:

Checks if $_SERVER array key exists in dot notation.

Parameters:

Returns:

Example:


getCookie

Description:

Returns value of single $_COOKIE array key in dot notation or entire array, with optional default value.

Parameters:

Returns:

Example:


hasCookie

Description:

Checks if $_COOKIE array key exists in dot notation.

Parameters:

Returns:

Example:


getHeader

Description:

Returns value of single header array key in dot notation or entire array, with optional default value.

Parameters:

Returns:

Example:


hasHeader

Description:

Checks if header array key exists in dot notation.

Parameters:

Returns:

Example:


getBody

Description:

Returns content body of a request.

Parameters:

Returns:

Example:


hasBody

Description:

Checks if content body of a request exists.

Parameters:

Returns:

Example:


getUserAgent

Description:

Returns client's user agent.

Parameters:

Returns:

Example:


getReferer

Description:

Returns client's referring URL.

Parameters:

Returns:

Example:


getIp

Description:

Returns the most probable IP of client with optional default value.

Parameters:

Returns:

Example:


isCli

Description:

Is the request originating from the command line.

Parameters:

Returns:

Example:


isJson

Description:

Is the Content-Type header for this request JSON.

Parameters:

Returns:

Example:


wantsJson

Description:

Does the Accept header for this request expect JSON.

Parameters:

Returns:

Example:


isHttps

Description:

Is connection HTTPS.

Parameters:

Returns:

Example:


getRequest

Description:

Returns array containing details of the client's request, or string of a specific part of the request.

Parameters:

Valid $part values include any of the PART_* constants:

Returns:

Example:


getUrl

Description:

Returns current URL.

Parameters:

Returns:

Example:


All versions of php-http-request with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
bayfrontmedia/php-array-helpers Version ^2.0
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 bayfrontmedia/php-http-request contains the following files

Loading the files please wait ....