知乎热搜排行榜
equalizer 累计使用:2789
请求地址 https://free.wqwlkj.cn/wqwlapi/zh_hot.php
请求示例 https://free.wqwlkj.cn/wqwlapi/zh_hot.php?type=json
请求方式 GET
返回格式 JSON
{
"code": 1,
"data": "{\"data\":[{\"name\":\"2026 年菲尔兹奖公布,中国籍数学家邓煜、王虹获奖,如何理解他们获奖的意义?\",\"hot\":\"1356 万热度\"},{\"name\":\"644 分考生因填志愿未看清厦门大学本部与分校将复读,去年同有16人报错相同分校复读,反映了哪些问题?\",\"hot\":\"401 万热度\"},{\"name\":\"如何看待旭旭宝宝展示水军「复制粘贴式同款黑文案」,硬刚黑粉报警且「每条有效水军证据悬赏10万元」?\",\"hot\":\"368 万热度\"},{\"name\":\"如何评价台球厅一男子拍助教屁股被索赔两千元,现因猥亵他人已被警方依法行政拘留?\",\"hot\":\"289 万热度\"},{\"name\":\"弥勒佛长那么胖,是因为碳水吃多了吗?\",\"hot\":\"273 万热度\"},{\"name\":\"伊朗称袭击美国亚马逊公司在巴林的数据基础设施,这个地方有多重要?将造成哪些影响?\",\"hot\":\"257 万热度\"},{\"name\":\"新能源车跨境自驾遭远程锁车,车主称「事前未提醒出境会被锁车」,汽车售出后厂商该不该保留「控制权」?\",\"hot\":\"108 万热度\"},{\"name\":\"连续37天喝9.9元咖啡的贫困生补助金,是否该取消?有较多自称贫困生的大学生维护喝咖啡自由,合理吗?\",\"hot\":\"106 万热度\"},{\"name\":\"为什么古代打仗不大量使用毒箭来快速消灭敌人?\",\"hot\":\"106 万热度\"},{\"name\":\"孙亚龙称 Bin 离队因『环境恶劣,输了就被放大镜找问题』,职业电竞选手为何面临如此高压?\",\"hot\":\"105 万热度\"}]}"
}
| 参数名称 | 是否必需 | 参数说明 |
|---|---|---|
type |
否 | 可选text json 默认text |
| 参数名称 | 参数类型 | 参数说明 |
|---|---|---|
code |
integer |
1成功 -1失败 |
data |
string |
排行榜数据 |
更新时间 2022-09-13 16:17:09
| 状态码 | 状态说明 |
|---|---|
| 400 | 请求错误 |
| 403 | 请求被服务器拒绝 |
| 404 | 请求服务器失败 |
| 500 | 服务器错误 |
| 503 | 服务器维护 |
PHP
GET方法
$url = 'https://free.wqwlkj.cn/wqwlapi/zh_hot.php';
$data = '?type=json';
$get = $url.$data;
$result = file_get_contents($get);
if ($result) {
//成功
echo $result;
} else {
//失败
}
POST方法
$url = 'https://free.wqwlkj.cn/wqwlapi/zh_hot.php';
$data = array(
  'type' => 'json',
);
$data = http_build_query($data);
$option = array('http'=>array('method'=>'POST','content'=>$data));
$context = stream_context_create($option);
$result = file_get_contents($url,false,$context);
if ($result) {
//成功
echo $result;
} else {
//失败
}
JavaScript
GET方法
var url = "https://free.wqwlkj.cn/wqwlapi/zh_hot.php"
var data = "?type=json"
var xhrGet = new XMLHttpRequest();
xhrGet.open('GET', url + data, true);
xhrGet.send();
xhrGet.onreadystatechange = function() {
if (xhrGet.readyState == 4 && xhrGet.status == 200) {
//成功
var result = xhrGet.responseText;
console.log(result);
} else {
//失败
}
};
POST方法
var url = "https://free.wqwlkj.cn/wqwlapi/zh_hot.php"
var data = "type=json"
var xhrPost = new XMLHttpRequest();
xhrPost.open('POST', url, true);
xhrPost.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhrPost.send(data);
xhrPost.onreadystatechange = function() {
if (xhrPost.readyState == 4 && xhrPost.status == 200) {
//成功
var result = xhrPost.responseText;
console.log(result);
} else {
//失败
}
};
JAVA
GET方法
new Thread(){
public void run() {
String path = "https://free.wqwlkj.cn/wqwlapi/zh_hot.php";
String data = "?type=json";
try {
URL url = new URL(path + data);
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setRequestMethod("GET");
int code = connection.getResponseCode();
if (code == 200) {
//成功
InputStreamReader isr = new InputStreamReader(connection.getInputStream());
BufferedReader bufferedreader = new BufferedReader(isr);
String string;
StringBuilder stringbuilder = new StringBuilder();
while ((string = bufferedreader.readLine()) != null) {
stringbuilder.append(string);
}
final String result = stringbuilder.toString();
System.out.println(result);
} else {
//失败
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}}.start();
POST方法
new Thread(){
public void run() {
String path = "https://free.wqwlkj.cn/wqwlapi/zh_hot.php";
String data = "type=json";
try {
URL url = new URL(path);
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setRequestMethod("POST");
connection.setDoOutput(true);
connection.getOutputStream().write(data.getBytes());
int code = connection.getResponseCode();
if (code == 200) {
//成功
InputStreamReader isr = new InputStreamReader(connection.getInputStream());
BufferedReader bufferedreader = new BufferedReader(isr);
String string;
StringBuilder stringbuilder = new StringBuilder();
while ((string = bufferedreader.readLine()) != null) {
stringbuilder.append(string);
}
final String result = stringbuilder.toString();
System.out.println(result);
} else {
//失败
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}}.start();
Lua
GET方法
url="https://free.wqwlkj.cn/wqwlapi/zh_hot.php"
data=url.."?type=json"
Http.get(data,function(code,content,data)
if code==200 then
--成功
print(content)
else
--失败
end
end)
POST方法
url="https://free.wqwlkj.cn/wqwlapi/zh_hot.php"
data="type=json"
Http.post(url,data,function(code,content,data)
if code==200 then
--成功
print(content)
else
--失败
end
end)
结绳
GET方法
变量 网络GET操作 为 网络操作 = 创建 网络操作()
变量 GET数据 为 文本型 = "?type=json"
网络GET操作.取网页源码("https://free.wqwlkj.cn/wqwlapi/zh_hot.php" + GET数据)
事件 网络GET操作:取网页源码结束(结果 为 文本型,cookie 为 文本型)
//成功
调试输出(结果)
结束 事件
事件 网络GET操作:取网页源码失败(响应码 为 文本型)
//失败
结束 事件
POST方法
变量 网络POST操作 为 网络操作 = 创建 网络操作()
变量 POST数据 为 文本型 = "type=json"
网络POST操作.发送数据("https://free.wqwlkj.cn/wqwlapi/zh_hot.php",POST数据)
事件 网络POST操作:发送数据结束(结果 为 文本型,cookie 为 文本型)
//成功
调试输出(结果)
结束 事件
事件 网络POST操作:发送数据失败(响应码 为 文本型)
//失败
结束 事件
iAPP
GET方法
s url="https://free.wqwlkj.cn/wqwlapi/zh_hot.php"
s data="?type=json"
ss(url+data,get)
t(){
hs(get,result)
f(result!=null){
//成功
syso(result)
}else{
//失败
}
}
POST方法
s url="https://free.wqwlkj.cn/wqwlapi/zh_hot.php"
s data="type=json"
t(){
hs(url,data,"utf-8",result)
f(result!=null){
//成功
syso(result)
}else{
//失败
}
} | 反馈时间 | 反馈接口 | 反馈内容 | 反馈者IP |
|---|