接口地址

https://api.vvhan.com/api/zhihu

返回格式

JSON

請求方式:

GET

請求示例

https://api.vvhan.com/api/zhihu?username=uxiaohan

參數說明

名稱 必填 類型 說明
username string 輸入知乎用戶名

返回數據

{"success":true,"home":"https:\/\/www.zhihu.com\/people\/uxiaohan","info":{"id":"101ead66b49d76d3a8307e9b8bcb9520","username":"uxiaohan","nickname":"韓小韓","sex":"男","avatar":"https:\/\/pic4.zhimg.com\/v2-d8032af17d9eddd96b7d1f906e9c0b13_l.jpg","signature":"山河遠闊"},"vip_info":{"is_vip":false,"widget":{},"vip_icon":{}}}

調用實例

直接調用

示例代碼

<?php
header("Content-Type:text/json;charset=UTF-8"); date_default_timezone_set("PRC"); $username = $_GET["username"]; $url = "https://api.vvhan.com/api/zhihu?username=" . $username; $data = file_get_contents($url); echo $data;
?>