Massive video data, open source website

WBOY
Release: 2016-07-25 09:04:53
Original
1475 people have browsed it
56.com opens API call data, and the entire site is open source

Demo address: http://dev.56.com:81/56api/index.php?type=baby


Please enter a descriptionMassive video data, open source website 56api_examples.zip (141 K) Number of downloads: 0

56 Network Open Platform Massive video data, open source website
  1. include("./SDK.php");
  2. $m = new Memcached();
  3. $m->addServer('172.16.245.91', 22222);
  4. $array = array() ;
  5. $category = new open56Client(APPKEY,APPSECRET);
  6. $cat = isset($_GET['type']) ? trim(strtolower($_GET['type'])) : "today";
  7. $ 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);
  8. if(isset($class[$cat])){
  9. $cid = $class[$cat] ;
  10. $key = "recommend_video_".$cat;
  11. if(!$array = $m->get($key)){
  12. $array = $category->recommendVideo($cid, $page = ' 1', $num = '20');
  13. $m->set($key, $array);
  14. }
  15. $recommend_hot = json_decode($array, true);
  16. }
  17. else{
  18. header("location : ./index.php");
  19. exit;
  20. }
Copy code


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template