XSY's API!

Machine-translated (anthropic, claude-haiku-5-5) from the Chinese original. Read the original in 中文

Contents

Preface

If you need it, don't read any of the rest, just go directly here: here

Baidu Translate API

Get the Baidu Translate API, cache translated content, support multiple languages

text
require 'fy/Api.php';

// 使用DEMO
$obj = new Fanyi();
$res = $obj->Obtain('Little ox, I love you', '英语', '韩语');
echo '<pre>';
var_dump( $res );

Parameter description for $this->Obtain():

text
$obj->Obtain(翻译内容, 起始语言, 目标语言);

Currently only the following languages are supported; Cantonese and classical Chinese translation are less capable:

text
$Lang = [
    'ara' => '阿拉伯语',
    'de'  => '德语',
    'ru'  => '俄语',
    'fra' => '法语',
    'kor' => '韩语',
    'nl'  => '荷兰语',
    'pt'  => '葡萄牙语',
    'jp'  => '日语',
    'th'  => '泰语',
    'wyw' => '文言文',
    'spa' => '西班牙语',
    'el'  => '希腊语',
    'it'  => '意大利语',
    'en'  => '英语',
    'yue' => '粤语',
    'zh'  => '中文',
];

Mobile Phone Number Location Query

Implemented by calling the Taobao API

Usage DEMO

text
$obj = new Phone_ownership();
$num = $obj->Obtain(13999999999);
echo '<pre>';
var_dump( $num );

Return value description

mts : First 7 digits of the mobile phone number

province : Location (province)

catName : Carrier

carrier : Location carrier

telString : Mobile phone number

areaVid : Unused parameter

ispVid : Unused parameter

Resident ID Card Authenticity Query

Usage DEMO

text
require 'id/Api.php';
$obj = new RealIDcard();
$num = $obj->Obtain('110226198501272116');
echo '<pre>';
var_dump( $num );

Return value description:

address : Location

date : Date of birth

sex : Gender

msg : Description

Express Delivery Query

Usage DEMO as follows:

text
require 'kd/Api.php';

// 使用DEMO
$obj = new Express();
$num = $obj->Obtain('536625023920');
echo '<pre>';
var_dump( $num );

Parameter description for $this->Obtain():

text
$obj->Obtain(单号, 中文类型:如韵达快递);
当不输入中文类型的时候,将自动识别快递类型,准确率:90%

Get Baidu Homepage Hot Search Terms in Real Time

Usage DEMO as follows:

text
require 'rc/Api.php';

// 使用DEMO
$obj = new Hotsearch();
$num = $obj->Obtain();
echo '<pre>';
var_dump( $num );

Callback parameter description for $this->Obtain():

text
[
    'title' => 词条名
    'num'   => 指数
    'sort'  => 近期排名升降:1|2 升|降
]

Crawl Search Engine Indexed Page Count

The current version only supports crawling the indexed page count of three search engines: Baidu, 360, and Sogou.

Usage DEMO as follows:

text
require 'site/Api.php';

// 使用DEMO
$obj = new Included();
$num = $obj->Obtain('sougou', 'www.junphp.com');
echo '<pre>';
var_dump( $num );

Parameter description for $this->Obtain():

text
$obj->Obtain(类型, 网址);
类型主要有以下三个:
baidu
360
sougou

Get Weather Forecast Information

Usage DEMO as follows:

text
require 'weather/Api.php';

# 使用DEMO
$obj = new Weather();
$num = $obj->Obtain('广州', 0);
echo '<pre>';
var_dump( $num );

Parameter description for $this->Obtain():

text
$obj->Obtain(市名称, 查询类型);
查询类型主要有以下五种:
0 :当天天气
1 :第二天
2 :第三天
3 :第四天
4 :第五天

Return value description:

text
下面我将建立一个表格来列出这些对应的标签的说明(可能有误,个人分析结果)

标签	说明
city	对应的查询城市
status1	白天天气情况
status2	夜间天气情况
figure1	白天天气情况拼音
figure2	夜间天气情况拼音
direction1	白天风向
direction2	夜晚风向
power1	白天风力
power2	夜间风力
temperature1	白天温度
temperature2	夜间温度
ssd	体感指数
tgd1	白天体感温度
tgd2	夜间体感温度
zwx	紫外线强度
ktk	空调指数
pollution	污染指数
xcz	洗车指数
zho	综合指数?这个我不确定
diy	没猜出来是什么指数,没有数值
fas	同上
chy	穿衣指数
zho_shuoming	zho的说明,然而zho是什么指数我也不确定
diy_shuoming	同上
fas_shuoming	同上
chy_shuoming	穿衣指数说明
pollution_l	污染程度
zwx_l	紫外线指数概述
ssd_l	体感指数概述
fas_l	这个不知道
zho_l	这个也不清楚
chy_l	穿衣指数概述(可理解为穿衣建议)
ktk_l	空调指数概述
xcz_l	洗车指数概述
diy_l	这个不知道
pollution_s	污染指数详细说明
zwx_s	紫外线详细说明
ssd_s	体感详细说明
ktk_s	空调指数详细说明
xcz_s	洗车详细说明
gm	感冒指数
gm_l	感冒指数概述
gm_s	感冒指数详细说明
yd	运动指数
yd_l	运动指数概述
yd_s	运动指数详细说明
savedate_weather	天气数据日期
savedate_life	生活数据日期
savedate_zhishu	指数数据日期
udatetime	更新时间

Comments