1. Go to this page and download the library: Download fofx/utility 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/ */
fofx / utility example snippets
use FOfX\Utility;
use Illuminate\Support\Arr;
$filename = __DIR__ . '/../resources/2-httpswwwfiverrcomcategoriesgraphics-designcreative-logo-design-fiverrcom-browserhtml.html';
$html = file_get_contents($filename);
$blocks = Utility\extract_embedded_json_blocks($html);
$filtered = Utility\filter_json_blocks_by_selector($blocks, 'perseus-initial-props', true);
// Use Arr::dot() to get a dot notation list of keys, to see the JSON structure
$dot_keys_only = array_keys(Arr::dot($filtered[0] ?? []));
print_r($dot_keys_only);