Advertisement
ipsBruno

(PHP) Pegar trailers e sinopses

Apr 19th, 2013
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.19 KB | None | 0 0
  1. // Pro Lucas
  2. //
  3. //
  4. // VIDEOTRAILER.PHP
  5. // PEGAR O VIDEO DO TRAILER E COLOCAR NA PÁGINA
  6. //
  7. //
  8.  
  9. <?php
  10.  
  11. $s = file_get_contents("http://www.cineclick.com.br/busca/filtroBusca?area=trailer&buscaGeral=" .urlencode($_GET['q']));
  12.  
  13. preg_match_all('/<a href="(.*?)" class="pequena2 padrao5">/', $s, $result);
  14.  
  15. $url = $result[1][0];
  16.  
  17.  
  18.  
  19. $arr = explode('file=', file_get_contents($url));
  20.  
  21. $err = explode('&', $arr[1]);
  22.  
  23. $url = $err[0];
  24.  
  25.  
  26. ?>
  27.  
  28. <div style="display:inline-block;">
  29.     <script type="text/javascript" src="http://www.webestools.com/page/js/flashobject.js"></script>
  30.     <div id="lecteur_40501" style="display:inline-block;">
  31.         <a href="http://get.adobe.com/fr/flashplayer/">You need to install the Flash plugin</a> - <a href="http://www.webestools.com/">Webestools</a> - <a href="http://www.webestools.com/flv-player-free-flash-mp4-mov-h264-put-videos-on-your-website-streaming-video-player-flv.html">Flash Flv Video Player</a>
  32.     </div>
  33.     <script type="text/javascript">
  34.     //<!--
  35.         var flashvars_40501 = {};
  36.         var params_40501 = {
  37.                 quality: "high",
  38.                 bgcolor: "#000000",
  39.                 allowScriptAccess: "always",
  40.                 allowFullScreen: "true",
  41.                 wmode: "transparent",               flashvars: "fichier=<?php echo $url; ?>&apercu=http://2.bp.blogspot.com/_c7xvHvN4XHQ/TTg9Mf7K9LI/AAAAAAAAAFI/C_vo8J-nKxA/s1600/Superbowl%2B2011%2BMovie%2BTrailer.jpg"
  42.             };
  43.         var attributes_40501 = {};
  44.         flashObject("http://flash.webestools.com/flv_player/v1_27.swf", "lecteur_40501", "720", "405", "8", false, flashvars_40501, params_40501, attributes_40501);
  45.     //-->
  46.     </script>
  47. </div>
  48.  
  49.  
  50. // ================================================================================
  51. //
  52. //
  53. // SINOPSE.php
  54. // PEGAR SINOPSE DO FILME
  55. //
  56.  
  57.  
  58.  
  59. <?php
  60.  
  61. $s = file_get_contents("http://www.cineclick.com.br/busca/filtroBusca?area=trailer&buscaGeral=" .urlencode($_GET['q']));
  62.  
  63.  
  64. preg_match_all('/<a href="(.*?)" class="pequena2 padrao5">/', $s, $result);
  65.  
  66. $url = $result[1][0];
  67.  
  68. $arr = explode('id/', $result[1][0]);
  69.  
  70. if(strlen($arr[1]) < 2) {
  71.    die("Nao foram encontradas sinopses para este filme");
  72. }
  73.  
  74. print(file_get_contents("http://www.cineclick.com.br/tvcineclick/info/id/" . $arr[1]));
  75.  
  76. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement