首页 微博百度热搜榜单 微博百度热搜榜单示例代码 抖音热搜[PHP]

抖音热搜示例代码[PHP]

作者: 阅读数:997 上传时间:2022-09-08

抖音热搜

<?php
 
require_once 'curl.func.php';
 
$appkey = 'your_appkey_here';//你的appkey
$url = "http://api.jisuapi.com/hotsearch/douyin?appkey=$appkey";
$result = curlOpen($url);
 
$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));
 
if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}
 
$result = $jsonarr['result'];
foreach($result as $val)
{
    echo $val['ranktop'].' '.$val['title'].' '.$val['linkurl'].' '.$val['score'].' '.$val['updatetime'].'<br>';
}