名称 | 必填 | 类型 | 说明 |
---|---|---|---|
空 | 否 | 无 | 图片输出 |
json | 否 | string | JSON输出 |
{"title":"很薄,很透,很舒适,很喜欢...","pic":"https:\/\/gw3.alicdn.com\/tfscom\/tuitui\/O1CN0178C4M11JOk9Xk6lKX_!!0-rate.jpg"}
<img src="https://api.vvhan.com/api/tao" alt="韩小韩API">
<?php
header('Content-type:text/json;charset=utf-8;'); date_default_timezone_set("PRC"); $url = "https://api.vvhan.com/api/tao"; $type = "?type=" . $_GET['type']; if ($type == "?type=json" || $type == "?type=JSON") { $result = file_get_contents($url . $type); echo $result; } else { header("Location:" . $url); }
?>