参数说明
名称 |
必填 |
类型 |
说明 |
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);
}
?>