Skip to content

bachors/GSM-Arena-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GSM-Arena-API

PHP Class untuk grab data di website gsm arena dan output berbentuk Array atau JSON menggunakan cURL dan simple html dom.


Usage:

<?php

// Include class gsm.php
require("gsm.php");

// Create objek
$gsm = new gsm();

Search:

$data = $gsm->search('zenfone'); // Keyword

Detail:

$data = $gsm->detail('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);

DEMO

About

cURL and return Array or JSON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published