PHP Classes

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

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 89 This week: 1All time: 9,945 This week: 560Up
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: 21 packages by
Country: Peru Peru
Age: ???
All time rank: 21074 in Peru Peru
Week rank: 8 Up1 in Peru Peru Up
Innovation award
Innovation award
Nominee: 9x

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  
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  /  src  
File Role Description
  Plain text file Request.php Class Class source
  Plain text file Utils.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:89
This week:1
All time:9,945
This week:560Up