Download the PHP package hugsbrugs/php-http without Composer

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

php-http

This library provides PHP utilities functions to manage URLs. Read PHP DOC

Build Status Coverage Status

Install

Install package with composer

In your PHP code, load librairy

Configuration

In order to use cache mechanism, define following constants

Alternatively define path to the local stored public suffix list

This method should not be used in production since it's really slow.

Otherwise the default, not accurate, cache/public_suffix_list.dat file will be used.

Usage

Execute shell nslookup command

Check if an url is accessible (means not a 404)

Returns HTTP code for given URL

Cleans an url from its query parameters

Cleans an url from its query parameters and path

Quick and dirty function to save an image from the internet

Returns basic HTTP headers for a CURL request

Extracts suffix, tld, domain and subdomain from an URL

Extracts extention from an URL

Extracts scheme (ftp, http) from an URL

Extracts a TLD (Top Level Domain) from an URL

Extracts a sub domain from an URL

Extracts a domain name from an URL

Separates Headers from Body in CURL response

Sets a php script desired status code (usefull for API)

Gets the address and/or http code that the provided URL redirects to. $return can be : url/code/all

Follows and collects all redirects, in order, for the given URL.

Gets the address and/or http code that the URL ultimately leads to. $return can be : url/code/all

Check a TXT record in domain zone file

Waits and tests every minute if domain zone has correct IP adress and TXT record set

Tests if domain zone has correct IP adress and TXT record set

Get name servers of given domain

Add escaped fragment to URL

To enable CORS, put this line at top of your PHP script

Converts an URL to a filename It does not encode URL parameters (only scheme - domain - folders - file)

Dependecies

https://github.com/jeremykendall/php-domain-parser https://github.com/jeremykendall/php-domain-parser/tree/5.7.0 https://publicsuffix.org/list/public_suffix_list.dat

Unit Tests

Author

Hugo Maugey Webmaster | Consultant SEO | Fullstack developer


All versions of php-http with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
true/punycode Version ~2.0
jeremykendall/php-domain-parser Version ^6.1.1
psr/simple-cache Version ^3.0
symfony/cache Version ^6.0
guzzlehttp/guzzle Version ^7.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 hugsbrugs/php-http contains the following files

Loading the files please wait ....