接口地址

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); }
?>