PageRenderTime 51ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 1ms

/filme/php/filme_link.php

https://code.google.com/p/hdforall/
PHP | 817 lines | 795 code | 2 blank | 20 comment | 53 complexity | ec35dafeab9b845d6029b5fd7e02868a MD5 | raw file
  1. #!/usr/local/bin/Resource/www/cgi-bin/php
  2. <?php
  3. error_reporting(0);
  4. $filelink=$_ENV["QUERY_STRING"];
  5. //$filelink = $_GET["file"];
  6. //$filelink="http://www.seriale.filmesubtitrate.info/2011/08/against-wall-sezon-1-ep-1-pilot-serial.html";
  7. $t1=explode(",",$filelink);
  8. $filelink = urldecode($t1[0]);
  9. $filelink = str_replace("*",",",$filelink);
  10. $filelink = str_replace("@","&",$filelink); //seriale.subtitrate.info
  11. $pg = urldecode($t1[1]);
  12. if ($pg == "") {
  13. $pg_title = "Link";
  14. } else {
  15. $pg_title = $pg;
  16. $pg = preg_replace('/[^A-Za-z0-9_]/','_',$pg);
  17. }
  18. $titledownload=$pg;
  19. $onlinemoca=$t1[2];
  20. //play movie
  21. if (file_exists("/tmp/usbmounts/sda1/download")) {
  22. $dir = "/tmp/usbmounts/sda1/download/";
  23. $dir_log = "/tmp/usbmounts/sda1/download/log/";
  24. } elseif (file_exists("/tmp/usbmounts/sdb1/download")) {
  25. $dir = "/tmp/usbmounts/sdb1/download/";
  26. $dir_log = "/tmp/usbmounts/sdb1/download/log/";
  27. } elseif (file_exists("/tmp/usbmounts/sdc1/download")) {
  28. $dir = "/tmp/usbmounts/sdc1/download/";
  29. $dir_log = "/tmp/usbmounts/sdc1/download/log/";
  30. } elseif (file_exists("/tmp/usbmounts/sda2/download")) {
  31. $dir = "/tmp/usbmounts/sda2/download/";
  32. $dir_log = "/tmp/usbmounts/sda2/download/log/";
  33. } elseif (file_exists("/tmp/usbmounts/sdb2/download")) {
  34. $dir = "/tmp/usbmounts/sdb2/download/";
  35. $dir_log = "/tmp/usbmounts/sdb2/download/log/";
  36. } elseif (file_exists("/tmp/usbmounts/sdc2/download")) {
  37. $dir = "/tmp/usbmounts/sdc2/download/";
  38. $dir = "/tmp/usbmounts/sdc2/download/log/";
  39. } elseif (file_exists("/tmp/hdd/volumes/HDD1/download")) {
  40. $dir = "/tmp/hdd/volumes/HDD1/download/";
  41. $dir_log = "/tmp/hdd/root/log/";
  42. } else {
  43. $dir = "";
  44. $dir_log = "";
  45. }
  46. // end
  47. ?>
  48. <?php echo "<?xml version='1.0' ?>"; ?>
  49. <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  50. <onEnter>
  51. storagePath = getStoragePath("tmp");
  52. storagePath_stream = storagePath + "stream.dat";
  53. storagePath_playlist = storagePath + "playlist.dat";
  54. setRefreshTime(1);
  55. first_time=1;
  56. </onEnter>
  57. <onExit>
  58. setRefreshTime(-1);
  59. </onExit>
  60. <onRefresh>
  61. if(first_time == 1)
  62. {
  63. setRefreshTime(-1);
  64. itemCount = getPageInfo("itemCount");
  65. first_time=0;
  66. }
  67. else if (do_down == 1)
  68. {
  69. topUrl = "http://127.0.0.1/cgi-bin/scripts/util/info_down.php?file=" + log_file + ",f";
  70. info_serial = getUrl(topUrl);
  71. }
  72. </onRefresh>
  73. <mediaDisplay name="threePartsView"
  74. itemBackgroundColor="0:0:0"
  75. backgroundColor="0:0:0"
  76. sideLeftWidthPC="0"
  77. sideRightWidthPC="0"
  78. sideColorRight="0:0:0"
  79. itemImageXPC="5"
  80. itemXPC="20"
  81. itemYPC="20"
  82. itemWidthPC="70"
  83. capWidthPC="70"
  84. unFocusFontColor="101:101:101"
  85. focusFontColor="255:255:255"
  86. showHeader="no"
  87. showDefaultInfo="yes"
  88. bottomYPC="90"
  89. infoYPC="100"
  90. infoXPC="0"
  91. popupXPC = "40"
  92. popupYPC = "55"
  93. popupWidthPC = "22.3"
  94. popupHeightPC = "5.5"
  95. popupFontSize = "13"
  96. popupBorderColor="28:35:51"
  97. popupForegroundColor="255:255:255"
  98. popupBackgroundColor="28:35:51"
  99. idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10"
  100. >
  101. <idleImage>image/POPUP_LOADING_01.png</idleImage>
  102. <idleImage>image/POPUP_LOADING_02.png</idleImage>
  103. <idleImage>image/POPUP_LOADING_03.png</idleImage>
  104. <idleImage>image/POPUP_LOADING_04.png</idleImage>
  105. <idleImage>image/POPUP_LOADING_05.png</idleImage>
  106. <idleImage>image/POPUP_LOADING_06.png</idleImage>
  107. <idleImage>image/POPUP_LOADING_07.png</idleImage>
  108. <idleImage>image/POPUP_LOADING_08.png</idleImage>
  109. <text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="18" fontSize="24" backgroundColor="10:105:150" foregroundColor="100:200:255">
  110. <script>getPageInfo("pageTitle");</script>
  111. </text>
  112. <text align="left" offsetXPC="6" offsetYPC="15" widthPC="100" heightPC="4" fontSize="16" backgroundColor="10:105:150" foregroundColor="100:200:255">
  113. Ap??a??i 1 pentru Download Manager, 2 pentru download, 3 pentru vizionare download, 4 verificare link
  114. </text>
  115. <text redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
  116. <script>print(info_serial); info_serial;</script>
  117. </text>
  118. <onUserInput>
  119. userInput = currentUserInput();
  120. ret = "false";
  121. if(userInput == "two" || userInput == "2")
  122. {
  123. tip=getItemInfo(getFocusItemIndex(),"tip");
  124. showIdle();
  125. if (tip == "1")
  126. {
  127. url = getItemInfo(getFocusItemIndex(),"download");
  128. movie=getUrl(url);
  129. info_serial="link:" + movie;
  130. topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
  131. }
  132. else if (tip == "2")
  133. {
  134. topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + getItemInfo(getFocusItemIndex(),"download") + ";name=" + getItemInfo(getFocusItemIndex(),"name");
  135. }
  136. dummy = getUrl(topUrl);
  137. cancelIdle();
  138. do_down=1;
  139. file_name= getItemInfo(getFocusItemIndex(),"title");
  140. log_file="<?php echo $dir_log; ?>" + getItemInfo(getFocusItemIndex(),"name") + ".log";
  141. setRefreshTime(10000);
  142. ret="true";
  143. }
  144. else if (userInput == "three" || userInput == "3")
  145. {
  146. url="<?php echo $dir; ?>" + getItemInfo(getFocusItemIndex(),"name");
  147. playItemurl(url,10);
  148. ret="true";
  149. }
  150. else if(userInput == "four" || userInput == "4")
  151. {
  152. showIdle();
  153. url = getItemInfo(getFocusItemIndex(),"download");
  154. info_serial="link:" + url;
  155. redrawdisplay();
  156. tip=getItemInfo(getFocusItemIndex(),"tip");
  157. if (tip == "1")
  158. {
  159. movie=getUrl(url);
  160. info_serial="movie:" + movie;
  161. }
  162. cancelIdle();
  163. redrawdisplay();
  164. ret="true";
  165. }
  166. else if (userInput == "one" || userInput == "1")
  167. {
  168. jumpToLink("destination");
  169. ret="true";
  170. }
  171. else
  172. {
  173. info_serial=" ";
  174. setRefreshTime(-1);
  175. do_down=0;
  176. ret="false";
  177. }
  178. ret;
  179. </onUserInput>
  180. </mediaDisplay>
  181. <destination>
  182. <link>http://127.0.0.1/cgi-bin/scripts/util/level.php
  183. </link>
  184. </destination>
  185. <channel>
  186. <?php
  187. echo "<title>".$pg_title."</title>"
  188. ;
  189. function str_between($string, $start, $end){
  190. $string = " ".$string; $ini = strpos($string,$start);
  191. if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini;
  192. return substr($string,$ini,$len);
  193. }
  194. function unpack_DivXBrowserPlugin($n_func,$html_cod,$sub=false) {
  195. $f=explode("return p}",$html_cod);
  196. $e=explode("'.split",$f[$n_func]);
  197. $ls=$e[0];
  198. //echo $ls;
  199. $a=explode(";",$ls);
  200. //print_r($a); //for debug only
  201. $a1=explode("'",$a[count($a)-1]); //char list for replace
  202. $b1=explode(",",$a1[1]);
  203. $base_enc=$b1[1];
  204. //echo $base_enc;
  205. $w=explode("|",$a1[2]);
  206. //print_r ($w);
  207. $ch="0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
  208. $ch="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  209. $ch="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
  210. $fl="";
  211. for ($i=0;$i<count($a)-1;$i++) {
  212. $fl=$fl.$a[$i];
  213. }
  214. $r="";
  215. $x=strlen($fl);
  216. for ($i=0;$i<strlen($fl);$i++) {
  217. if (!preg_match('/[A-Za-z0-9]/',$fl[$i])) { //nu e alfanumeric
  218. $r=$r.$fl[$i];
  219. } elseif (($i<$x) && (preg_match('/[A-Za-z0-9]/',$fl[$i])) && (preg_match('/[A-Za-z0-9]/',$fl[$i+1]))) {
  220. $pos=strpos($ch,$fl[$i+1]);
  221. $pos=$base_enc*$fl[$i] + $pos;
  222. if ($w[$pos] <> "")
  223. $r=$r.$w[$pos];
  224. else
  225. $r=$r.$fl[$i].$fl[$i+1];
  226. } elseif (($i>0) && (preg_match('/[A-Za-z0-9]/',$fl[$i])) && (preg_match('/[A-Za-z0-9]/',$fl[$i-1]))) {
  227. // nothing
  228. } else {
  229. $pos=strpos($ch,$fl[$i]);
  230. if ($w[$pos] <> "")
  231. $r=$r.$w[$pos];
  232. else
  233. $r=$r.$fl[$i];
  234. }
  235. }
  236. $r=str_replace("\\","",$r);
  237. //echo $r;
  238. $ret_val=str_between($r,'param name="src"value="','"');
  239. if ($ret_val == "")
  240. $ret_val = str_between($r,"file','","'");
  241. if ($sub==true) {
  242. $srt=str_between($r,"captions.file','","'");
  243. $srt = str_replace(" ","%20",$srt);
  244. $ret_val=$ret_val.",".$srt;
  245. }
  246. return $ret_val;
  247. }
  248. /**####################################**/
  249. /** Here we start.......**/
  250. $last_link = "";
  251. //if (strpos($filelink,"onlinemoca") === false) {
  252. if (strpos($filelink,"filmeonlinesubtitrate") !== false) {
  253. $post="pageviewnr=1";
  254. $ch = curl_init($filelink);
  255. curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5');
  256. curl_setopt($ch,CURLOPT_REFERER,$filelink);
  257. //curl_setopt ($ch, CURLOPT_POST, 1);
  258. //curl_setopt ($ch, CURLOPT_POSTFIELDS, $post);
  259. curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1);
  260. curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL
  261. curl_setopt($ch, CURLOPT_HEADER, true);
  262. $html = curl_exec($ch);
  263. curl_close ($ch);
  264. //$l = str_between($html,"Link: <",">;");
  265. //echo $l;
  266. //Link: <http://www.filmeonlinesubtitrate.tv/?p=5382>; rel=shortlink
  267. //$AgetHeaders = @get_headers($filelink);
  268. //echo $AgetHeaders;
  269. } elseif (strpos($filelink,"990.ro") !== false) {
  270. $link1 = str_replace("download","",$filelink);
  271. $link1 = str_replace("seriale2","player-seriale",$link1);
  272. $ch = curl_init($link1);
  273. curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5');
  274. curl_setopt($ch,CURLOPT_REFERER,$filelink);
  275. curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1);
  276. curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL
  277. $html = curl_exec($ch);
  278. curl_close ($ch);
  279. $filelink=$link1;
  280. } else {
  281. $html = file_get_contents($filelink);
  282. }
  283. $mysrt=str_between($html,"captions.file=","&");
  284. $mysrt = str_replace(" ","%20",$mysrt);
  285. /**################ All links ################**/
  286. if(preg_match_all("/(http\b.*?)(\"|\')+/i",$html,$matches)) {
  287. $links=$matches[1];
  288. }
  289. $s="/adf\.ly|vidxden\.c|divxden\.c|vidbux\.c|movreel\.c|videoweed\.(c|e)|novamov\.(c|e)|vk\.com";
  290. $s=$s."|movshare\.net|youtu|flvz\.com|rapidmov\.net|putlocker\.com|mixturevideo\.com|";
  291. $s=$s."peteava\.ro\/embed|peteava\.ro\/id|content\.peteava\.ro|divxstage\.net|divxstage\.eu";
  292. $s=$s."|vimeo\.com|googleplayer\.swf|filebox\.ro\/get_video|vkontakte\.ru|megavideo\.com|videobam\.com";
  293. $s=$s."|fastupload\.ro|fastupload\.rol\.ro|video\.rol\.ro|zetshare\.net\/embed|ufliq\.com|stagero\.eu|ovfile\.com";
  294. $s=$s."|trilulilu|proplayer\/playlist-controller.php|viki\.com|modovideo\.com|roshare\.info|";
  295. $s=$s."filebox\.com|glumbouploads\.com|uploadc\.com|sharefiles4u\.com|zixshare\.com|uploadboost\.com";
  296. $s=$s."|nowvideo\.eu|vreer\.com/i";
  297. for ($i=0;$i<count($links);$i++) {
  298. $cur_link=$links[$i];
  299. if (preg_match($s,$cur_link)) {
  300. if ($cur_link <> $last_link) {
  301. if (!preg_match("/facebook|twitter|img\.youtube/",$cur_link)) {
  302. $t1=explode("proxy.link=",$cur_link); //filmeonline.org
  303. if ($t1[1] <> "") {
  304. $cur_link=$t1[1];
  305. }
  306. $link="http://127.0.0.1/cgi-bin/scripts/filme/php/link.php?file=".urlencode($cur_link);
  307. if (strpos($cur_link,"adf.ly") !==false) { //onlinemoca
  308. $a1=explode($cur_link,$html);
  309. $a2=explode('server/',$a1[1]);
  310. $a3=explode('.',$a2[1]);
  311. $server=$a3[0];
  312. } else {
  313. $server = str_between($cur_link,"http://","/");
  314. }
  315. $last_link=$cur_link;
  316. if (strpos($cur_link,"google") !==false) {
  317. $t1=explode("docid=",$cur_link);
  318. $t2=explode("&",$t1[1]);
  319. $docid=$t2[0];
  320. $mysrt_google="http://video.google.com/videotranscript?frame=c&docid=".$docid."&hl=ro&type=track&name=ro&lang=ro";
  321. }
  322. if (strpos($cur_link,"viki.com") !==false) {
  323. preg_match('/(viki\.com\/player\/medias\/)([\w\-]+)/', $cur_link, $match);
  324. $viki_id = $match[2];
  325. }
  326. if (strpos($cur_link,"roshare.info") !==false) {
  327. $h=file_get_contents($cur_link);
  328. $ret=unpack_DivXBrowserPlugin(2,$h,true);
  329. $ret1=explode(",",$ret);
  330. $mysrt=$ret1[1];
  331. }
  332. $title=$server. " - With seek - SDK4";
  333. echo'
  334. <item>
  335. <title>'.$title.'</title>
  336. <onClick>
  337. <script>
  338. showIdle();
  339. movie="'.$link.'";
  340. url=getUrl(movie);
  341. cancelIdle();
  342. streamArray = null;
  343. streamArray = pushBackStringArray(streamArray, "");
  344. streamArray = pushBackStringArray(streamArray, "");
  345. streamArray = pushBackStringArray(streamArray, url);
  346. streamArray = pushBackStringArray(streamArray, url);
  347. streamArray = pushBackStringArray(streamArray, video/x-flv);
  348. streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
  349. streamArray = pushBackStringArray(streamArray, "1");
  350. writeStringToFile(storagePath_stream, streamArray);
  351. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer.rss");
  352. </script>
  353. </onClick>
  354. <download>'.$link.'</download>
  355. <tip>1</tip>
  356. <name>'.$titledownload.'.flv</name>
  357. </item>
  358. ';
  359. if (($mysrt <> "") || ($mysrt_google <> "") || ($viki_id <> "")){
  360. $f = "/usr/local/bin/home_menu";
  361. echo'
  362. <item>
  363. <title>Play cu subtitrare</title>
  364. <onClick>
  365. <script>
  366. showIdle();
  367. ';
  368. if ($mysrt_google <> "") {
  369. echo '
  370. dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/google_xml.php?file='.urlencode($mysrt_google).'");';
  371. } else if ($viki_id <> "") {
  372. echo '
  373. dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/viki_xml.php?file='.$viki_id.'");';
  374. } else {
  375. echo '
  376. dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/srt_xml.php?file='.urlencode($mysrt).'");';
  377. }
  378. echo '
  379. movie="'.$link.'";
  380. url=getUrl(movie);
  381. cancelIdle();
  382. storagePath = getStoragePath("tmp");
  383. storagePath_stream = storagePath + "stream.dat";
  384. streamArray = null;
  385. streamArray = pushBackStringArray(streamArray, "");
  386. streamArray = pushBackStringArray(streamArray, "");
  387. streamArray = pushBackStringArray(streamArray, url);
  388. streamArray = pushBackStringArray(streamArray, url);
  389. streamArray = pushBackStringArray(streamArray, video/mp4);
  390. streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
  391. streamArray = pushBackStringArray(streamArray, "1");
  392. writeStringToFile(storagePath_stream, streamArray);
  393. ';
  394. if (file_exists($f)) {
  395. echo '
  396. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer2.rss");
  397. ';
  398. } else {
  399. echo '
  400. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer1.rss");
  401. ';
  402. }
  403. echo '
  404. </script>
  405. </onClick>
  406. <download>'.$link.'</download>
  407. <tip>1</tip>
  408. <name>'.$titledownload.'.flv</name>
  409. </item>
  410. ';
  411. }
  412. }
  413. }
  414. }
  415. }
  416. /**################ special links ##############**/
  417. if (preg_match_all('/<(iframe\b|object\b)[^>]+src\s?=\s?([\'|\"])(.*?)(\"|\')+/is', $html, $matches)) {
  418. $links=$matches[3];
  419. }
  420. $link="";
  421. $srt="";
  422. $tip="";
  423. for ($i=0;$i<count($links);$i++) {
  424. $cur_link=$links[$i];
  425. if (strpos($cur_link,"rofilm.info") !==false) {
  426. $baza = file_get_contents($cur_link);
  427. $t1=explode('value="file=',$baza);
  428. $t2=explode("&",$t1[1]);
  429. $link = $t2[0];
  430. if ($link=="") {
  431. $t1=explode("value='file=",$baza);
  432. $t2=explode("&",$t1[1]);
  433. $link=$t2[0];
  434. }
  435. if ($link == "") {
  436. $link1=str_between($baza,'proxy.link=','"');
  437. $tip="1";
  438. $link2="http://127.0.0.1/cgi-bin/scripts/filme/php/link.php?file=".urlencode($link1);
  439. $server = str_between($link1,"http://","/");
  440. $title=$server. " - With seek - SDK4";
  441. if ($link1 <> "") {
  442. echo'
  443. <item>
  444. <title>'.$title.'</title>
  445. <onClick>
  446. <script>
  447. showIdle();
  448. movie="'.$link2.'";
  449. url=getUrl(movie);
  450. cancelIdle();
  451. streamArray = null;
  452. streamArray = pushBackStringArray(streamArray, "");
  453. streamArray = pushBackStringArray(streamArray, "");
  454. streamArray = pushBackStringArray(streamArray, url);
  455. streamArray = pushBackStringArray(streamArray, url);
  456. streamArray = pushBackStringArray(streamArray, video/x-flv);
  457. streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
  458. streamArray = pushBackStringArray(streamArray, "1");
  459. writeStringToFile(storagePath_stream, streamArray);
  460. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer.rss");
  461. </script>
  462. </onClick>
  463. <download>'.$link2.'</download>
  464. <tip>1</tip>
  465. <name>'.$titledownload.'.flv</name>
  466. </item>
  467. ';
  468. }
  469. $t1=explode('captions.file=',$baza);
  470. $t2=explode("&",$t1[1]);
  471. $srt=$t2[0];
  472. $srt = str_replace(" ","%20",$srt);
  473. $f = "/usr/local/bin/home_menu";
  474. echo'
  475. <item>
  476. <title>Play cu subtitrare</title>
  477. <onClick>
  478. <script>
  479. showIdle();
  480. dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/srt_xml.php?file='.urlencode($srt).'");
  481. movie="'.$link2.'";
  482. url=getUrl(movie);
  483. cancelIdle();
  484. streamArray = null;
  485. streamArray = pushBackStringArray(streamArray, "");
  486. streamArray = pushBackStringArray(streamArray, "");
  487. streamArray = pushBackStringArray(streamArray, url);
  488. streamArray = pushBackStringArray(streamArray, url);
  489. streamArray = pushBackStringArray(streamArray, video/x-flv);
  490. streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
  491. streamArray = pushBackStringArray(streamArray, "1");
  492. writeStringToFile(storagePath_stream, streamArray);
  493. ';
  494. if (file_exists($f)) {
  495. echo '
  496. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer2.rss");
  497. ';
  498. } else {
  499. echo '
  500. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer1.rss");
  501. ';
  502. }
  503. echo '
  504. </script>
  505. </onClick>
  506. <download>'.$link2.'</download>
  507. <tip>1</tip>
  508. <name>'.$titledownload.'.flv</name>
  509. </item>
  510. ';
  511. }
  512. } elseif (strpos($cur_link,"serialetvonline.info") !==false) {
  513. if (strpos($cur_link,"gettvguide2.php") === false) {
  514. $baza = file_get_contents($cur_link);
  515. $link = str_between($baza,'"flashvars" value="file=','&');
  516. $t1=explode('captions.file=',$baza);
  517. $t2=explode("&",$t1[1]);
  518. $srt=$t2[0];
  519. $srt = str_replace(" ","%20",$srt);
  520. }
  521. } elseif (strpos($cur_link,"rosharing.info") !==false){
  522. $baza = file_get_contents($cur_link);
  523. $ret=unpack_DivXBrowserPlugin(2,$baza,true);
  524. $ret1=explode(",",$ret);
  525. $srt=$ret1[1];
  526. $link=$ret1[0];
  527. } elseif (strpos($cur_link,"roshare.info") !==false){
  528. $baza = file_get_contents($cur_link);
  529. $ret=unpack_DivXBrowserPlugin(2,$baza,true);
  530. $ret1=explode(",",$ret);
  531. $srt=$ret1[1];
  532. $link=$ret1[0];
  533. } elseif (strpos($cur_link,"rosharing.com") !==false) {
  534. $baza = file_get_contents($cur_link);
  535. $link = str_between($baza,'value="file=','&');
  536. $t1=explode('captions.file=',$baza);
  537. $t2=explode("&",$t1[1]);
  538. $srt=$t2[0];
  539. $srt = str_replace(" ","%20",$srt);
  540. } else {
  541. $link="";
  542. $srt="";
  543. }
  544. // if ($link <> $last_link) {
  545. if ($link <> "") {
  546. $server = str_between($link,"http://","/");
  547. $title=$server. " - With seek - SDK4";
  548. echo'
  549. <item>
  550. <title>'.$title.'</title>
  551. <onClick>
  552. <script>
  553. showIdle();
  554. url="'.$link.'";
  555. cancelIdle();
  556. streamArray = null;
  557. streamArray = pushBackStringArray(streamArray, "");
  558. streamArray = pushBackStringArray(streamArray, "");
  559. streamArray = pushBackStringArray(streamArray, url);
  560. streamArray = pushBackStringArray(streamArray, url);
  561. streamArray = pushBackStringArray(streamArray, video/x-flv);
  562. streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
  563. streamArray = pushBackStringArray(streamArray, "1");
  564. writeStringToFile(storagePath_stream, streamArray);
  565. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer.rss");
  566. </script>
  567. </onClick>
  568. <download>'.$link.'</download>
  569. <tip>2</tip>
  570. <name>'.$titledownload.'.flv</name>
  571. </item>
  572. ';
  573. if (($srt <> "") && (strpos($srt,".srt") !==false)) {
  574. $f = "/usr/local/bin/home_menu";
  575. echo'
  576. <item>
  577. <title>Play cu subtitrare</title>
  578. <onClick>
  579. <script>
  580. showIdle();
  581. dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/srt_xml.php?file='.urlencode($srt).'");
  582. url="'.$link.'";
  583. cancelIdle();
  584. streamArray = null;
  585. streamArray = pushBackStringArray(streamArray, "");
  586. streamArray = pushBackStringArray(streamArray, "");
  587. streamArray = pushBackStringArray(streamArray, url);
  588. streamArray = pushBackStringArray(streamArray, url);
  589. streamArray = pushBackStringArray(streamArray, video/x-flv);
  590. streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
  591. streamArray = pushBackStringArray(streamArray, "1");
  592. writeStringToFile(storagePath_stream, streamArray);
  593. ';
  594. if (file_exists($f)) {
  595. echo '
  596. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer2.rss");
  597. ';
  598. } else {
  599. echo '
  600. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer1.rss");
  601. ';
  602. }
  603. echo '
  604. </script>
  605. </onClick>
  606. <download>'.$link.'</download>
  607. <tip>2</tip>
  608. <name>'.$titledownload.'.flv</name>
  609. </item>
  610. ';
  611. }
  612. }
  613. $last_link = $link;
  614. // }
  615. }
  616. /**################ flash... mediafile,file.....############**/
  617. $videos = explode('flash', $html);
  618. unset($videos[0]);
  619. $videos = array_values($videos);
  620. foreach($videos as $video) {
  621. $t1 = explode('ile=', $video);
  622. $t2 = explode('&', $t1[1]);
  623. $t3 = explode("'",$t2[0]);
  624. $link = urldecode($t3[0]);
  625. if (strpos($video,"proxy.link") !== false) { //www.seriale-filme.info ,filmeonline.org
  626. $link=str_between($video,'proxy.link=','"');
  627. }
  628. if (($link <> "") && strcmp($link,$lastlink)) {
  629. if (strpos($link, 'http://') !== false){
  630. $titledownload = $pg;
  631. $title=str_between($link,"http://","/");
  632. $ext=".flv";
  633. $lastlink = $link;
  634. if (!preg_match($s,$link)) { //exclud link-urile care trebuie "preparate", astea trebuie sa fie in prima analiza!
  635. // for sdk4.... with seek
  636. $title=$title. " - With seek - SDK4";
  637. echo'
  638. <item>
  639. <title>'.$title.'</title>
  640. <onClick>
  641. <script>
  642. showIdle();
  643. url="'.$link.'";
  644. cancelIdle();
  645. streamArray = null;
  646. streamArray = pushBackStringArray(streamArray, "");
  647. streamArray = pushBackStringArray(streamArray, "");
  648. streamArray = pushBackStringArray(streamArray, url);
  649. streamArray = pushBackStringArray(streamArray, url);
  650. streamArray = pushBackStringArray(streamArray, video/x-flv);
  651. streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
  652. streamArray = pushBackStringArray(streamArray, "1");
  653. writeStringToFile(storagePath_stream, streamArray);
  654. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer.rss");
  655. </script>
  656. </onClick>
  657. <download>'.$link.'</download>
  658. <tip>2</tip>
  659. <name>'.$titledownload.'.'.$ext.'</name>
  660. </item>
  661. ';
  662. if (strpos($link,"jurnaltv.ro") !==false) {
  663. $title=$title."(H)";
  664. echo'
  665. <item>
  666. <title>'.$title.'</title>
  667. <onClick>
  668. <script>
  669. showIdle();
  670. url="'.$link.'";
  671. cancelIdle();
  672. streamArray = null;
  673. streamArray = pushBackStringArray(streamArray, "");
  674. streamArray = pushBackStringArray(streamArray, "");
  675. streamArray = pushBackStringArray(streamArray, url);
  676. streamArray = pushBackStringArray(streamArray, url);
  677. streamArray = pushBackStringArray(streamArray, video/x-flv);
  678. streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
  679. streamArray = pushBackStringArray(streamArray, "1");
  680. writeStringToFile(storagePath_stream, streamArray);
  681. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer_h.rss");
  682. </script>
  683. </onClick>
  684. <download>'.$link.'</download>
  685. <tip>2</tip>
  686. <name>'.$titledownload.'.'.$ext.'</name>
  687. </item>
  688. ';
  689. }
  690. }
  691. $srt1 = str_between($video,'captions.file=','&');
  692. $t1=explode('"',$srt1);
  693. $srt = $t1[0];
  694. if (strpos($srt,"http") === false) {
  695. ////www.veziserialeonline.info,www.seriale-filme.info
  696. $s1=explode("/",$filelink);
  697. $s=$s1[2];
  698. $srt="http://".$s.$srt;
  699. }
  700. $srt = str_replace(" ","%20",$srt);
  701. $pct = substr($srt, -4, 1);
  702. if (($srt <> "") && ($pct == ".") && (strpos($srt,".srt") !==false) && (strpos($srt,"000.srt") === false) ) {
  703. $f = "/usr/local/bin/home_menu";
  704. echo'
  705. <item>
  706. <title>Play cu subtitrare</title>
  707. <onClick>
  708. <script>
  709. showIdle();
  710. dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/srt_xml.php?file='.urlencode($srt).'");
  711. url="'.$link.'";
  712. cancelIdle();
  713. streamArray = null;
  714. streamArray = pushBackStringArray(streamArray, "");
  715. streamArray = pushBackStringArray(streamArray, "");
  716. streamArray = pushBackStringArray(streamArray, url);
  717. streamArray = pushBackStringArray(streamArray, url);
  718. streamArray = pushBackStringArray(streamArray, video/x-flv);
  719. streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
  720. streamArray = pushBackStringArray(streamArray, "1");
  721. writeStringToFile(storagePath_stream, streamArray);
  722. ';
  723. if (file_exists($f)) {
  724. echo '
  725. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer2.rss");
  726. ';
  727. } else {
  728. echo '
  729. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer1.rss");
  730. ';
  731. }
  732. echo '
  733. </script>
  734. </onClick>
  735. <download>'.$link.'</download>
  736. <tip>2</tip>
  737. <name>'.$titledownload.'.flv</name>
  738. </item>
  739. ';
  740. }
  741. }
  742. }
  743. } //foreach
  744. //http://www.filmesubtitrate.info/2010/06/10-things-i-hate-about-you-sez1-ep1.html
  745. //http://www.seriale.filmesubtitrate.info/2010/06/10-things-i-hate-about-you-sez1-ep1.html
  746. if (strpos($filelink,"filmesubtitrate.info") !== false) {
  747. ///playerfs/plmfilmesub.php?lk=a8u25iq4cach
  748. //peteava - http://www.seriale.filmesubtitrate.info/playerfs/peteava.php?lk=503993
  749. //videoweed - http://www.seriale.filmesubtitrate.info/playerfs/plmweed.php?lk=gdubcouik7ogu&km=A.Seriale/Alcatraz%20S01E01
  750. //novamov - http://www.seriale.filmesubtitrate.info/playerfs/plmnova.php?lk=f6uol0yy3s2sp&km=A.Seriale/Alcatraz%20S01E01
  751. //vidbux - http://www.seriale.filmesubtitrate.info/playerfs/plmvidb.php?lk=e2tjkd08bok4&km=A.Seriale/Alcatraz%20S01E01
  752. //vidxden - http://www.seriale.filmesubtitrate.info/playerfs/plmvidx.php?lk=1798z8fap6g3/Touch_S01E01.flv.html
  753. $title = "";
  754. $f = "/usr/local/bin/home_menu";
  755. $videos = explode('playerfs', $html);
  756. unset($videos[0]);
  757. $videos = array_values($videos);
  758. foreach($videos as $video) {
  759. $t1=explode('"',$video);
  760. $link="http://www.seriale.filmesubtitrate.info/playerfs".$t1[0];
  761. if (strpos($link,"plmfilmesub") !== false) $title="roshare";
  762. if (strpos($link,"peteava") !== false) $title="peteava";
  763. if (strpos($link,"plmweed") !== false) $title="videoweed";
  764. if (strpos($link,"plmnova") !== false) $title="novamov";
  765. if (strpos($link,"plmvidb") !== false) $title="vidbux";
  766. if (strpos($link,"plmvidx") !== false) $title="vidxden";
  767. $link="http://127.0.0.1/cgi-bin/scripts/filme/php/link.php?file=".urlencode($link);
  768. if ($title <> "") {
  769. echo'
  770. <item>
  771. <title>'.$title.'</title>
  772. <onClick>
  773. <script>
  774. showIdle();
  775. movie="'.$link.'";
  776. url=getUrl(movie);
  777. cancelIdle();
  778. streamArray = null;
  779. streamArray = pushBackStringArray(streamArray, "");
  780. streamArray = pushBackStringArray(streamArray, "");
  781. streamArray = pushBackStringArray(streamArray, url);
  782. streamArray = pushBackStringArray(streamArray, url);
  783. streamArray = pushBackStringArray(streamArray, video/x-flv);
  784. streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
  785. streamArray = pushBackStringArray(streamArray, "1");
  786. writeStringToFile(storagePath_stream, streamArray);
  787. ';
  788. if (file_exists($f)) {
  789. echo '
  790. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer2.rss");
  791. ';
  792. } else {
  793. echo '
  794. doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer1.rss");
  795. ';
  796. }
  797. echo '
  798. </script>
  799. </onClick>
  800. <download>'.$link.'</download>
  801. <tip>1</tip>
  802. <name>'.$titledownload.'.flv</name>
  803. </item>
  804. ';
  805. }
  806. }
  807. }
  808. ?>
  809. </channel>
  810. </rss>