1. Go to this page and download the library: Download mtchabok/request library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mtchabok / request example snippets
use \Mtchabok\Request\Request;
$request = Request::newRequest(Request::METHOD_CLI);
$request = Request::newRequestGlobal(['method'=>Request::METHOD_GET]);
use \Mtchabok\Request\Request;
$request = Request::newRequest();
$request->server->HTTP_HOST;
$request->server->getString('REMOTE_ADDR', '127.0.0.1');
$request->server['REQUEST_TIME'];
use \Mtchabok\Request\Request;
$request = Request::newRequest();
$request->query->foo; // string
$request->query->getNumber('id', 12); // numeric: int or float
$request->query['page']; // string