PHP code example of light / apistore
1. Go to this page and download the library: Download light/apistore 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/ */
light / apistore example snippets
php composer.phar
$store = new light\apistore\ApiStore('your key');
$api = $store->phone;
$result = $api->get('15292312331');
if ($result['errcode'] == 0) {
var_dump($result['data']);
} else {
echo 'Get error: ', $result['errmsg'];
}
class Sms extends Api
{
private $address = 'http://apiurl';
public function get($params)
{
return $this->fetch($this->address . http_build_query($params));
}
}