PHP Classes

PHP HTTP Request Library: Compose and send HTTP requests to given URLs

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 89 All time: 9,968 This week: 673Up
Version License PHP version Categories
http-request-library 1.0MIT/X Consortium ...5HTTP, PHP 5
Description 

Author

This package can compose and send HTTP requests to given URLs.

It provides static functions to define the parameters of an HTTP request that the package will send to a specific URL.

The package can take parameters for defining the HTTP request method, request headers, body data, etc.

It can execute the HTTP request and return the response as an array with the response details or save the response as a downloaded file.

Picture of Mateo
  Performance   Level  
Name: Mateo <contact>
Classes: 23 packages by
Country: Peru Peru
Age: ???
All time rank: 20464 in Peru Peru
Week rank: 15 Up1 in Peru Peru Up
Innovation award
Innovation award
Nominee: 10x

Winner: 3x

Documentation

Easy curl

Installation

Github:

git clone https://github.com/Mateodioev/request
cd request
composer install

Composer:

composer require mateodioev/request

Usage

require 'path/to/vendor/autoload.php';

use Mateodioev\Request\Request;

# GET
$res = Request::Get('https://httpbin.org/get');
# POST
$res = Request::Post('https://httpbin.org/post');

# Format
$method = 'GET'; // GET, POST, PUT, DELETE, etc.
$res = Request::$method($url, $headers_array, $postfield_data);

# Methods
Request::Init();
Request::AddOpts();
Request::AddOpt();
Request::addHeaders();
Request::addBody();
Request::setMethod();
Request::Close();
Request::Run();
Request::Create();
Request::Download();

  Files folder image Files (4)  
File Role Description
Files folder imagesrc (2 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (4)  /  src  
File Role Description
  Plain text file Request.php Class Class source
  Plain text file Utils.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:89
This week:0
All time:9,968
This week:673Up