PHP code example of sekjun9878 / request-parser

1. Go to this page and download the library: Download sekjun9878/request-parser 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/ */

    

sekjun9878 / request-parser example snippets


$requestParser = new RequestParser;
$requestParser->addData("GET /democracy/init HTTP/1.1\r\nUser-Agent: The Illuminati/2.0\r\nContent-Length: 10\r\n\r\nOver 9000!");

$request = Request::create($requestParser->exportRequestState());

var_dump($request->getHeaders());
var_dump($request->getPOST());

php composer.phar