接口地址

https://api.vvhan.com/api/acgimg

返回格式

JSON

請求方式:

GET

請求示例(圖片輸出):

https://api.vvhan.com/api/acgimg

請求示例(JSON輸出):

https://api.vvhan.com/api/acgimg?type=json

 

參數說明

名稱 必填 類型 說明
type string 輸出的格式

返回數據

{"code": "200","acgurl": "http:\/\/url.vvhan.com\/viewimg\/api.vvhan.com[16].jpg","width": "2048","height": "1152","size": "jpg"}

調用實例

<img src="https://api.vvhan.com/api/acgimg" alt="韓小韓API">

示例代碼

<?php
header('Content-type:text/json;charset=utf-8;'); date_default_timezone_set("PRC"); $url = "https://api.vvhan.com/api/acgimg"; $type = $_GET['type']; if ($type == "json") { $result = file_get_contents($url . "?type=json"); echo $result; } else { header("Location:" . $url); }
?>