1. Go to this page and download the library: Download php-pico/http-factory 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/ */
use PhpPico\Http\Factory\HttpFactory;
use PhpPico\Http\Factory\ServerRequestCreator;
$creator = new ServerRequestCreator(new HttpFactory());
$request = $creator->fromGlobals();
use PhpPico\Http\Factory\RequestFactoryTrait;
use PhpPico\Http\Factory\ResponseFactoryTrait;
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Http\Message\ResponseFactoryInterface;
final class MyFactory implements RequestFactoryInterface, ResponseFactoryInterface
{
use RequestFactoryTrait;
use ResponseFactoryTrait;
}
$creator = new ServerRequestCreator(new HttpFactory(), ['10.0.0.0/8']);
$request = $creator->fromGlobals();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.