PHP code example of 96qbhy / free-apis

1. Go to this page and download the library: Download 96qbhy/free-apis 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/ */

    

96qbhy / free-apis example snippets



$api = new Qbhy\FreeApis\FreeApis([
    'debug'   => true,
    'express' => '查快递app key',
]);

var_dump($api->express->query('快递单号')); // 查快递
var_dump($api->translation->google('你好', 'en')); // 翻译
var_dump($api->weather->queryWithCityName('广州')); // 天气查询
var_dump($api->ip->getIpInfo('IP地址')); // IP查询