fulgerx2007 / gsmarena-api
GsmArena API
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 44
Type:project
pkg:composer/fulgerx2007/gsmarena-api
Requires
- php: >=7.2
This package is auto-updated.
Last update: 2025-10-14 05:22:39 UTC
README
PHP Class for grab data on gsmarena.com website and output Array or JSON using cURL and simple html dom.
Usage:
use FulgerX2007\GsmArena\GsmArenaApi; require_once 'vendor/autoload.php'; // Create object $gsm = new GsmArenaApi();
Brands:
$data = $gsm->getBrands();
Search:
$data = $gsm->search('zenfone');
Detail:
$data = $gsm->getDeviceDetail('asus_zenfone_max_zc550kl-7476'); // Slug
Return Array:
print_r($data);
Return JSON:
// Convert ARRAY to JSON header('Content-Type: application/json'); echo json_encode($data, JSON_PRETTY_PRINT);