1. Go to this page and download the library: Download goenitz/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/ */
$request = new \Goenitz\Request\Request();
$email = $request->post->email;
if (is_null($email)) {
//do sth
}
//or
$email = $request->post['email'];
//or
$email = $request->post('email');
//or set a default value
$email = $request->post('email', '[email protected]');
//or get all post data as an array.
$post = $request->post->toArray();
$page = $request->get->page;
$ip = $request->server->REMOTE_ADDR
// etc.