PHP code example of geggleto / foundation
1. Go to this page and download the library: Download geggleto/foundation 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/ */
geggleto / foundation example snippets
// ...
use \Geggleto\Foundation\Factory\ServerRequestFactory;
$factory = new ServerRequestFactory();
$request = $factory->parseFromString("GET /docs/index.html HTTP/1.1
Host: http://www.test101.com
Accept: image/gif, image/jpeg, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
// $request is PSR-7!