Już niedługo nowy layout i kilka niespodzianek...
Podświetlanie składni: Zawijaj linie.
Nick: brak Data dodania: 14.02.11 12:27:36 Adres IP: 178.36.79.*
  1. <?
  2.  
  3. if($_GET['max']!="")
  4. {
  5.  
  6. $link = '/<div class="title">(.*)</';
  7.  
  8. $link2 = '/<a href="([^"]+)">/';
  9.  
  10. $link3 = '/">([^"]+)</';
  11.  
  12. $mb = '&lt;div class="more"&gt;&lt;b&gt;([^"]+)&lt;/b&gt;&lt;/div&gt;';
  13.  
  14. $max = '15';
  15. $str=0;
  16.  
  17. $sURLTpl = 'http://www.wrzuta.pl/szukaj/audio/'.plustxt($GET['q']).'/'.$GET['page'].'';
  18.  
  19. $rC = curlinit();
  20. curlsetopt($rC, CURLOPTHEADER, 0);
  21. curlsetopt($rC, CURLOPTRETURNTRANSFER, 1);
  22. curlsetopt($rC, CURLOPTVERBOSE, 1);
  23. curlsetopt($rC, CURLOPTREFERER, 'www.wrzuta.pl');
  24. curlsetopt($rC, CURLOPTURL, sprintf($sURLTpl, urlencode($sQ)));
  25. $sData = curlexec($rC);
  26. curl_close($rC);
  27.  
  28. pregmatchall($link, $sData, $aResults);
  29. $aResults = array_pop($aResults);
  30.  
  31. $iletab = count($aResults);
  32.  
  33. if($iletab>=1)
  34. {
  35.  
  36. pregmatchall($mb, $sData, $l3);
  37. $l3 = array_pop($l3);
  38.  
  39. foreach($aResults as $iKey) {
  40.  
  41. $iKey=strreplace("/audio/","/sr/f/",$iKey);
  42. $iKey=strreplace('">','.mp3">',$iKey);
  43.  
  44. pregmatchall($link2, $iKey, $l2);
  45. $l2 = array_pop($l2);
  46.  
  47. pregmatchall($link3, $iKey, $l4);
  48. $l4 = array_pop($l4);
  49.  
  50. $mbb='Czas: '.$l3[$str];
  51. $mbb=str_replace("</b> | <b>",", Rozmiar: ",$mbb);
  52. ?>
  53. <div style="width:680px;height:70px;float:left;">
  54. <b><? echo $l4[0]; ?></b><br>
  55.  
  56. <? echo $mbb; ?><br><br><object type="application/x-shockwave-flash" data="player.swf" id="audioplayer1" height="24" width="290">
  57. <param name="movie" value="player.swf">
  58. <param name="FlashVars" value="playerID=1&loop=no&autostart=no&soundFile=<? echo $l2[0]; ?>">
  59. <param name="quality" value="high">
  60. <param name="menu" value="false">
  61. <param name="wmode" value="transparent">
  62. </object><br><DIV ALIGN="right"><a href="pobierz,<? echo base64_encode($l2[0]); ?>.html"><font size="2" face="Arial" color="white"><img src="download.png" border="0"></font><hr size="1" color="#ffd200">
  63. <font color="white" face="Arial" size="2"></font><br></a></div>
  64. <div style="width:620px;height:20px;float:left;">
  65. <?
  66. $str++;
  67. }
  68.  
  69. echo'<center><table><tr><td>';if($GET['page']&gt;=2){echo'&lt;a class="dol" href="szukaj,'.plustxt($GET['q']).','.($GET['page']+1).','.$max.',html"&gt;...&lt;/a&gt;';}else{echo'';}echo'&amp;nbsp;&lt;/td&gt;&lt;td&gt;';
  70. for($i=1;$i&lt;=$max;$i++)
  71. {
  72. if($GET['page']!=$i){echo'<a class="dol" href="szukaj,'.plustxt($GET['q']).','.$i.','.$max.'.html"&gt;'.$i.'&lt;/a&gt;';}else{echo'&lt;b&gt;'.$i.'&lt;/b&gt;';}echo", ";
  73. }
  74. echo'&lt;/td&gt;&lt;td&gt;&amp;nbsp;';if($GET['page']<=($max-1)){echo'<a class="dol" href="szukaj,'.plustxt($GET['q']).','.($GET['page']+1).','.$max.'.html">...</a>';}else{echo'...';}echo'</td></tr></table></center><br>';
  75. }
  76.  
  77. else
  78. {
  79. echo"<div class=\"brak_mp3\">";
  80. echo"<br />Nie ma takiej mp3 w naszej bazie.";
  81. echo"</div>";
  82.  
  83. }
  84. }
  85. ?><br></div>