imeidb / sdk
简单轻量级的SDK,用于与ImeiDB API协同工作
dev-master
2021-08-24 14:23 UTC
Requires
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-09-24 21:26:29 UTC
README
IMEIDB - 一个大型的数据库,允许您解密IMEI手机设备并获得相关信息。
- 网站:https://imeidb.xyz
- API链接:https://imeidb.xyz/api
功能
- 检索余额当前状态的信息
- 解码IMEI并检索相关信息
安装
使用composer安装基本组件
composer require imeidb/sdk
示例
{YOUR_SECRET_TOKEN} - 您访问API的个人代码,可在您的个人账户中找到。(这里:https://imeidb.xyz/user)
use imeidb\sdk\ImeiDBClient; # Init $client = new ImeiDBClient('{YOUR_SECRET_TOKEN}'); # Get information about the current state of the account $response = $client->getBalance(); # Decode the imei number $response = $client->getDecode('352877111096108'); # Process results if ($response->getStatusCode() === 200) { $data = json_decode($response->getBody()->getContents()); }
基本情况下,信息将以JSON格式返回。我们支持JSON和XML两种格式。
use imeidb\sdk\ImeiDBClient; # Using initialize method $client = new ImeiDBClient('{YOUR_SECRET_TOKEN}', ImeiDBClient::FORMAT_XML); # or using dynamically change format $client->setFormat(ImeiDBClient::FORMAT_XML);