Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. <?php
  2. $url="http://tvstartup.biz/mng-channel/vpanel/api/vodcategories.php?user=barkitv&pass=76372dd88e5968f999c2cbb693290fc3";
  3. $ch = curl_init();
  4. curl_setopt($ch, CURLOPT_URL, $url);
  5. curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  6. $categoryResponse = curl_exec($ch);
  7. $categoryResults=json_decode($categoryResponse);
  8. var_dump($categoryResponse); die();
  9. ?>
  10. <?php if(count($categoryResults->categories)>0):?>
  11. <?php foreach($categoryResults->categories as $category): ?>
  12. <div id="ss_menu">
  13. <div class="ss_button"><h3 class="cwhite flip"><?php echo $category->title; ?></h3></div>
  14. <!-- <ul class="videos"> -->
  15. <div class="ss_content" style="display: none;">
  16. <?php
  17. $url="http://tvstartup.biz/mng-channel/vpanel/v1/categorized_videos.php?token=76372dd88e5968f999c2cbb693290fc3&id=" . $category->id;
  18. $ch = curl_init();
  19. curl_setopt($ch, CURLOPT_URL, $url);
  20. curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  21. $videosResponse = curl_exec($ch);
  22. $videosResults=json_decode($videosResponse);
  23.  
  24. ?>
  25. <?php if(count($videosResults->videos)>0):?>
  26. <?php foreach($videosResults->videos as $video): ?>
  27.  
  28. <!-- <li> -->
  29. <div class="thumb">
  30. <img alt="videos" src="<?php echo $video->image_1;?>" style="width:218px;height:158px;">
  31. <a href="http://barkitv.com/barki/watch-video/?id=<?php echo $video->id; ?>">Watch</a>
  32. </div>
  33.  
  34. <!-- </li> -->
  35.  
  36. <?php endforeach;?>
  37. <?php else:?>
  38. <h2>Nothing Found</h2>
  39. <?php endif;?>
  40. </div>
  41. <!-- </ul> -->
  42. <?php endforeach;?>
  43. <?php else:?>
  44. <h2>Nothing Found</h2>
  45. <?php endif;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement