知乎热搜排行榜
equalizer 累计使用:2490
请求地址 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\":\"鱼从来没上过陆地,为什么知道玉米粒可以吃?\",\"hot\":\"354 万热度\"},{\"name\":\"女子称网购盒马斑节虾煮熟渗出蓝色液体,客服称不影响食用,蓝色液体是怎么来的?食用对健康有影响吗?\",\"hot\":\"280 万热度\"},{\"name\":\"联合国报告称全球「水破产」时代已来临,什么是「水破产」?会对我们的生活造成哪些影响?\",\"hot\":\"263 万热度\"},{\"name\":\"为什么第四代住宅普遍不被大家接受?\",\"hot\":\"252 万热度\"},{\"name\":\"网传腾讯某工区楼下健身房不向员工免费,却对隔壁楼字节员工免费,引发腾讯员工不满,这是怎么回事?\",\"hot\":\"167 万热度\"},{\"name\":\"小米用户称天冷前轮转向会发出「咯噔」声,官方称是正常现象,车企口中的「阿克曼角」现象到底是怎么回事?\",\"hot\":\"148 万热度\"},{\"name\":\"《明日方舟:终末地》公测值得入坑吗?\",\"hot\":\"127 万热度\"},{\"name\":\"消息称阿里旗下芯片公司平头哥拟独立上市,可能性有多大?如何解读阿里这一战略部署?\",\"hot\":\"117 万热度\"},{\"name\":\"同事跟我同一岗位,却总是以类似领导命令的语气要求我的工作,我该怎么办?\",\"hot\":\"110 万热度\"},{\"name\":\"U23 亚洲杯半决赛,拜合拉木因捡球致对手染红,这在足球比赛中体现了怎样的战术或心理博弈?\",\"hot\":\"96 万热度\"}]}"
}
| 参数名称 | 是否必需 | 参数说明 |
|---|---|---|
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 |
|---|