Massive video data, open-source websites

Source: Internet
Author: User
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

  1. Include ("./SDK. php ");
  2. $ M = new Memcached ();
  3. $ M-> addServer ('2017. 16.245.91 ', 172 );
  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. }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.