1. Go to this page and download the library: Download frootbox/http 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/ */
frootbox / http example snippets
use Frootbox\Http\Post;
$post = new Post();
$title = $post->get('Title');
$countryId = $post->getIntWithDefault('CountryId');
$isActive = $post->getBoolean('Active');
use Frootbox\Http\Get;
$get = new Get();
$get->set('page', 2);
use Frootbox\Http\Post;
$post = new Post([
'CountryId' => '5',
]);
use Frootbox\Http\Response;
$response = (new Response())
->withStatus(201)
->setHeader('Content-Type', 'application/json');
$response->setBody(json_encode(['ok' => true]));
$response->flush();
use Frootbox\Http\Traits\UrlSanitize;
final class Slugger
{
use UrlSanitize;
}
$slug = (new Slugger())->getStringUrlSanitized('Äpfel & Öl');
// aepfel-und-oel
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.