1. Go to this page and download the library: Download alexistm/simple-json-php 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/ */
alexistm / simple-json-php example snippets
\Simple\json;
$json = new json();
// Objects to send (fetched from the DB for example)
$object = new stdClass();
$object->LastLog = '123456789123456';
$object->Password = 'Mypassword';
$object->Dramatic = 'Cat';
$object->Things = array(1,2,3);
// Forge the JSON
$json->data = $object;
$json->user = AlexisTM;
$json->status = 'online';
// Send the JSON
$json->send();