56网开放api调用数据,整站开源
演示地址:
http://dev.56.com:81/56api/index.php?type=baby
请输入描述 56api_examples.zip (141 K) 下载次数:0
56网开放平台
![海量视频数据,开源网站 海量视频数据,开源网站](/default/index/img?u=aHR0cDovL2ltZy5pdC1ob21lLm9yZy9kYXRhL2F0dGFjaG1lbnQvZm9ydW0vMjAxNHBpYy8yODE3MjgxN185dXZWLmpwZw==)
- include("./SDK.php");
-
- $m = new Memcached();
- $m->addServer('172.16.245.91', 22222);
-
- $array = array();
- $category = new open56Client(APPKEY,APPSECRET);
-
- $cat = isset($_GET['type']) ? trim(strtolower($_GET['type'])) : "today";
-
- $class = array('today'=>1,'ent'=>3,'art'=>4,'tv'=>5,'mtv'=>6,'mm'=>8,'show' => 9,'ori'=>39,'net'=>11,'fun' => 10,'record'=>12,'auto'=>13,'game'=>14,'girl' => 15,'baby'=>16);
-
- if(isset($class[$cat])){
- $cid = $class[$cat];
- $key = "recommend_video_".$cat;
-
- if(!$array = $m->get($key)){
- $array = $category->recommendVideo($cid, $page = '1', $num = '20');
- $m->set($key, $array);
- }
- $recommend_hot = json_decode($array, true);
- }
- else{
- header("location: ./index.php");
- exit;
- }
复制代码
|