Massive video data, open-source websites
56 open api call data for the entire site open source Demo address: http://dev.56.com: 81/56 api/index. php? Type = baby Enter description56api_examples.zip (141 K) Downloads: 0 56 open network platform
- Include ("./SDK. php ");
- $ M = new Memcached ();
- $ M-> addServer ('2017. 16.245.91 ', 172 );
- $ 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;
- }
|