PageRenderTime 21ms CodeModel.GetById 10ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/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
  3error_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]);
 12if ($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
 21if (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>
119userInput = currentUserInput();
120ret = "false";
121if(userInput == "two" || userInput == "2")
122{
123tip=getItemInfo(getFocusItemIndex(),"tip");
124showIdle();
125if (tip == "1")
126{
127url =  getItemInfo(getFocusItemIndex(),"download");
128movie=getUrl(url);
129info_serial="link:" + movie;
130topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + movie + ";name=" + getItemInfo(getFocusItemIndex(),"name");
131}
132else if (tip == "2")
133{
134topUrl = "http://127.0.0.1/cgi-bin/scripts/util/download.cgi?link=" + getItemInfo(getFocusItemIndex(),"download") + ";name=" + getItemInfo(getFocusItemIndex(),"name");
135}
136dummy = getUrl(topUrl);
137cancelIdle();
138do_down=1;
139file_name= getItemInfo(getFocusItemIndex(),"title");
140log_file="<?php echo $dir_log; ?>" + getItemInfo(getFocusItemIndex(),"name") + ".log";
141setRefreshTime(10000);
142ret="true";
143}
144else if (userInput == "three" || userInput == "3")
145{
146 url="<?php echo $dir; ?>" + getItemInfo(getFocusItemIndex(),"name");
147 playItemurl(url,10);
148 ret="true";
149}
150else if(userInput == "four" || userInput == "4")
151{
152showIdle();
153url =  getItemInfo(getFocusItemIndex(),"download");
154info_serial="link:" + url;
155redrawdisplay();
156tip=getItemInfo(getFocusItemIndex(),"tip");
157if (tip == "1")
158{
159movie=getUrl(url);
160info_serial="movie:" + movie;
161}
162cancelIdle();
163redrawdisplay();
164ret="true";
165}
166else if (userInput == "one" || userInput == "1")
167{
168jumpToLink("destination");
169ret="true";
170}
171else
172{
173info_serial=" ";
174setRefreshTime(-1);
175do_down=0;
176ret="false";
177}
178ret;
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
187echo "<title>".$pg_title."</title>"
188;
189function 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}
194function 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/**####################################**/
250/** Here we start.......**/
251$last_link = "";
252//if (strpos($filelink,"onlinemoca") === false) {
253if (strpos($filelink,"filmeonlinesubtitrate") !== false) {
254
255  $post="pageviewnr=1";
256  $ch = curl_init($filelink);
257  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');
258  curl_setopt($ch,CURLOPT_REFERER,$filelink);
259  //curl_setopt ($ch, CURLOPT_POST, 1);
260  //curl_setopt ($ch, CURLOPT_POSTFIELDS, $post);
261  curl_setopt($ch, CURLOPT_FOLLOWLOCATION  ,1);
262  curl_setopt($ch, CURLOPT_RETURNTRANSFER  ,1);  // RETURN THE CONTENTS OF THE CALL
263  curl_setopt($ch, CURLOPT_HEADER, true);
264  $html = curl_exec($ch);
265  curl_close ($ch);
266  //$l = str_between($html,"Link: <",">;");
267  //echo $l;
268  //Link: <http://www.filmeonlinesubtitrate.tv/?p=5382>; rel=shortlink
269  //$AgetHeaders = @get_headers($filelink);
270  //echo $AgetHeaders;
271} elseif (strpos($filelink,"990.ro") !== false) {
272    $link1 = str_replace("download","",$filelink);
273    $link1 = str_replace("seriale2","player-seriale",$link1);
274  $ch = curl_init($link1);
275  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');
276  curl_setopt($ch,CURLOPT_REFERER,$filelink);
277  curl_setopt($ch, CURLOPT_FOLLOWLOCATION  ,1);
278  curl_setopt($ch, CURLOPT_RETURNTRANSFER  ,1);  // RETURN THE CONTENTS OF THE CALL
279  $html = curl_exec($ch);
280  curl_close ($ch);
281  $filelink=$link1;
282} else {
283  $html = file_get_contents($filelink);
284}
285$mysrt=str_between($html,"captions.file=","&");
286$mysrt = str_replace(" ","%20",$mysrt);
287/**################ All links ################**/
288if(preg_match_all("/(http\b.*?)(\"|\')+/i",$html,$matches)) {
289$links=$matches[1];
290}
291$s="/adf\.ly|vidxden\.c|divxden\.c|vidbux\.c|movreel\.c|videoweed\.(c|e)|novamov\.(c|e)|vk\.com";
292$s=$s."|movshare\.net|youtu|flvz\.com|rapidmov\.net|putlocker\.com|mixturevideo\.com|";
293$s=$s."peteava\.ro\/embed|peteava\.ro\/id|content\.peteava\.ro|divxstage\.net|divxstage\.eu";
294$s=$s."|vimeo\.com|googleplayer\.swf|filebox\.ro\/get_video|vkontakte\.ru|megavideo\.com|videobam\.com";
295$s=$s."|fastupload\.ro|fastupload\.rol\.ro|video\.rol\.ro|zetshare\.net\/embed|ufliq\.com|stagero\.eu|ovfile\.com";
296$s=$s."|trilulilu|proplayer\/playlist-controller.php|viki\.com|modovideo\.com|roshare\.info|";
297$s=$s."filebox\.com|glumbouploads\.com|uploadc\.com|sharefiles4u\.com|zixshare\.com|uploadboost\.com";
298$s=$s."|nowvideo\.eu|vreer\.com/i";
299for ($i=0;$i<count($links);$i++) {
300  $cur_link=$links[$i];
301  if (preg_match($s,$cur_link)) {
302    if ($cur_link <> $last_link) {
303      if (!preg_match("/facebook|twitter|img\.youtube/",$cur_link)) {
304        $t1=explode("proxy.link=",$cur_link); //filmeonline.org
305        if ($t1[1] <> "") {
306        $cur_link=$t1[1];
307        }
308        $link="http://127.0.0.1/cgi-bin/scripts/filme/php/link.php?file=".urlencode($cur_link);
309        if (strpos($cur_link,"adf.ly") !==false) { //onlinemoca
310           $a1=explode($cur_link,$html);
311           $a2=explode('server/',$a1[1]);
312           $a3=explode('.',$a2[1]);
313           $server=$a3[0];
314        } else {
315          $server = str_between($cur_link,"http://","/");
316        }
317        $last_link=$cur_link;
318        if (strpos($cur_link,"google") !==false) {
319          $t1=explode("docid=",$cur_link);
320          $t2=explode("&",$t1[1]);
321          $docid=$t2[0];
322          $mysrt_google="http://video.google.com/videotranscript?frame=c&docid=".$docid."&hl=ro&type=track&name=ro&lang=ro";
323        }
324        if (strpos($cur_link,"viki.com") !==false) {
325          preg_match('/(viki\.com\/player\/medias\/)([\w\-]+)/', $cur_link, $match);
326          $viki_id = $match[2];
327        }
328        if (strpos($cur_link,"roshare.info") !==false) {
329          $h=file_get_contents($cur_link);
330          $ret=unpack_DivXBrowserPlugin(2,$h,true);
331          $ret1=explode(",",$ret);
332          $mysrt=$ret1[1];
333        }
334        $title=$server. " - With seek - SDK4";
335	    echo'
336	    <item>
337	    <title>'.$title.'</title>
338        <onClick>
339        <script>
340        showIdle();
341        movie="'.$link.'";
342        url=getUrl(movie);
343        cancelIdle();
344        streamArray = null;
345        streamArray = pushBackStringArray(streamArray, "");
346        streamArray = pushBackStringArray(streamArray, "");
347        streamArray = pushBackStringArray(streamArray, url);
348        streamArray = pushBackStringArray(streamArray, url);
349        streamArray = pushBackStringArray(streamArray, video/x-flv);
350        streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
351        streamArray = pushBackStringArray(streamArray, "1");
352        writeStringToFile(storagePath_stream, streamArray);
353        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer.rss");
354        </script>
355        </onClick>
356        <download>'.$link.'</download>
357        <tip>1</tip>
358        <name>'.$titledownload.'.flv</name>
359        </item>
360        ';
361
362        if (($mysrt <> "") || ($mysrt_google <> "") || ($viki_id <> "")){
363        $f = "/usr/local/bin/home_menu";
364	    echo'
365	    <item>
366	    <title>Play cu subtitrare</title>
367        <onClick>
368        <script>
369        showIdle();
370        ';
371        if ($mysrt_google <> "") {
372        echo '
373        dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/google_xml.php?file='.urlencode($mysrt_google).'");';
374        } else if ($viki_id <> "") {
375        echo '
376        dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/viki_xml.php?file='.$viki_id.'");';
377        } else {
378        echo '
379        dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/srt_xml.php?file='.urlencode($mysrt).'");';
380        }
381        echo '
382        movie="'.$link.'";
383        url=getUrl(movie);
384        cancelIdle();
385        storagePath = getStoragePath("tmp");
386        storagePath_stream = storagePath + "stream.dat";
387        streamArray = null;
388        streamArray = pushBackStringArray(streamArray, "");
389        streamArray = pushBackStringArray(streamArray, "");
390        streamArray = pushBackStringArray(streamArray, url);
391        streamArray = pushBackStringArray(streamArray, url);
392        streamArray = pushBackStringArray(streamArray, video/mp4);
393        streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
394        streamArray = pushBackStringArray(streamArray, "1");
395        writeStringToFile(storagePath_stream, streamArray);
396        ';
397        if (file_exists($f)) {
398        echo '
399        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer2.rss");
400        ';
401        } else {
402        echo '
403        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer1.rss");
404        ';
405        }
406        echo '
407        </script>
408        </onClick>
409        <download>'.$link.'</download>
410        <tip>1</tip>
411        <name>'.$titledownload.'.flv</name>
412        </item>
413       ';
414
415  }
416      }
417    }
418  }
419}
420/**################ special links ##############**/
421if (preg_match_all('/<(iframe\b|object\b)[^>]+src\s?=\s?([\'|\"])(.*?)(\"|\')+/is', $html, $matches)) {
422$links=$matches[3];
423}
424$link="";
425$srt="";
426$tip="";
427for ($i=0;$i<count($links);$i++) {
428  $cur_link=$links[$i];
429    if (strpos($cur_link,"rofilm.info") !==false) {
430     $baza = file_get_contents($cur_link);
431     $t1=explode('value="file=',$baza);
432     $t2=explode("&",$t1[1]);
433     $link = $t2[0];
434     if ($link=="") {
435       $t1=explode("value='file=",$baza);
436       $t2=explode("&",$t1[1]);
437       $link=$t2[0];
438     }
439     if ($link == "") {
440       $link1=str_between($baza,'proxy.link=','"');
441       $tip="1";
442        $link2="http://127.0.0.1/cgi-bin/scripts/filme/php/link.php?file=".urlencode($link1);
443        $server = str_between($link1,"http://","/");
444        $title=$server. " - With seek - SDK4";
445        if ($link1 <> "") {
446	    echo'
447	    <item>
448	    <title>'.$title.'</title>
449        <onClick>
450        <script>
451        showIdle();
452        movie="'.$link2.'";
453        url=getUrl(movie);
454        cancelIdle();
455        streamArray = null;
456        streamArray = pushBackStringArray(streamArray, "");
457        streamArray = pushBackStringArray(streamArray, "");
458        streamArray = pushBackStringArray(streamArray, url);
459        streamArray = pushBackStringArray(streamArray, url);
460        streamArray = pushBackStringArray(streamArray, video/x-flv);
461        streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
462        streamArray = pushBackStringArray(streamArray, "1");
463        writeStringToFile(storagePath_stream, streamArray);
464        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer.rss");
465        </script>
466        </onClick>
467        <download>'.$link2.'</download>
468        <tip>1</tip>
469        <name>'.$titledownload.'.flv</name>
470        </item>
471        ';
472        }
473
474     $t1=explode('captions.file=',$baza);
475     $t2=explode("&",$t1[1]);
476     $srt=$t2[0];
477     $srt = str_replace(" ","%20",$srt);
478    	$f = "/usr/local/bin/home_menu";
479	    echo'
480	    <item>
481	    <title>Play cu subtitrare</title>
482        <onClick>
483        <script>
484        showIdle();
485        dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/srt_xml.php?file='.urlencode($srt).'");
486        movie="'.$link2.'";
487        url=getUrl(movie);
488        cancelIdle();
489        streamArray = null;
490        streamArray = pushBackStringArray(streamArray, "");
491        streamArray = pushBackStringArray(streamArray, "");
492        streamArray = pushBackStringArray(streamArray, url);
493        streamArray = pushBackStringArray(streamArray, url);
494        streamArray = pushBackStringArray(streamArray, video/x-flv);
495        streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
496        streamArray = pushBackStringArray(streamArray, "1");
497        writeStringToFile(storagePath_stream, streamArray);
498        ';
499        if (file_exists($f)) {
500        echo '
501        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer2.rss");
502        ';
503        } else {
504        echo '
505        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer1.rss");
506        ';
507        }
508        echo '
509        </script>
510        </onClick>
511        <download>'.$link2.'</download>
512        <tip>1</tip>
513        <name>'.$titledownload.'.flv</name>
514        </item>
515        ';
516     }
517    } elseif (strpos($cur_link,"serialetvonline.info") !==false) {
518      if (strpos($cur_link,"gettvguide2.php") === false) {
519       $baza = file_get_contents($cur_link);
520       $link = str_between($baza,'"flashvars" value="file=','&');
521       $t1=explode('captions.file=',$baza);
522       $t2=explode("&",$t1[1]);
523       $srt=$t2[0];
524       $srt = str_replace(" ","%20",$srt);
525      }
526     } elseif (strpos($cur_link,"rosharing.info") !==false){
527       $baza = file_get_contents($cur_link);
528       $ret=unpack_DivXBrowserPlugin(2,$baza,true);
529       $ret1=explode(",",$ret);
530       $srt=$ret1[1];
531       $link=$ret1[0];
532     } elseif (strpos($cur_link,"roshare.info") !==false){
533       $baza = file_get_contents($cur_link);
534       $ret=unpack_DivXBrowserPlugin(2,$baza,true);
535       $ret1=explode(",",$ret);
536       $srt=$ret1[1];
537       $link=$ret1[0];
538     } elseif (strpos($cur_link,"rosharing.com") !==false) {
539       $baza = file_get_contents($cur_link);
540       $link = str_between($baza,'value="file=','&');
541       $t1=explode('captions.file=',$baza);
542       $t2=explode("&",$t1[1]);
543       $srt=$t2[0];
544       $srt = str_replace(" ","%20",$srt);
545     } else {
546       $link="";
547       $srt="";
548     }
549//  if ($link <> $last_link) {
550  if ($link <> "") {
551        $server = str_between($link,"http://","/");
552        $title=$server. " - With seek - SDK4";
553	    echo'
554	    <item>
555	    <title>'.$title.'</title>
556        <onClick>
557        <script>
558        showIdle();
559        url="'.$link.'";
560        cancelIdle();
561        streamArray = null;
562        streamArray = pushBackStringArray(streamArray, "");
563        streamArray = pushBackStringArray(streamArray, "");
564        streamArray = pushBackStringArray(streamArray, url);
565        streamArray = pushBackStringArray(streamArray, url);
566        streamArray = pushBackStringArray(streamArray, video/x-flv);
567        streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
568        streamArray = pushBackStringArray(streamArray, "1");
569        writeStringToFile(storagePath_stream, streamArray);
570        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer.rss");
571        </script>
572        </onClick>
573        <download>'.$link.'</download>
574        <tip>2</tip>
575        <name>'.$titledownload.'.flv</name>
576        </item>
577        ';
578  if (($srt <> "") && (strpos($srt,".srt") !==false)) {
579    	$f = "/usr/local/bin/home_menu";
580	    echo'
581	    <item>
582	    <title>Play cu subtitrare</title>
583        <onClick>
584        <script>
585        showIdle();
586        dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/srt_xml.php?file='.urlencode($srt).'");
587        url="'.$link.'";
588        cancelIdle();
589        streamArray = null;
590        streamArray = pushBackStringArray(streamArray, "");
591        streamArray = pushBackStringArray(streamArray, "");
592        streamArray = pushBackStringArray(streamArray, url);
593        streamArray = pushBackStringArray(streamArray, url);
594        streamArray = pushBackStringArray(streamArray, video/x-flv);
595        streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
596        streamArray = pushBackStringArray(streamArray, "1");
597        writeStringToFile(storagePath_stream, streamArray);
598        ';
599        if (file_exists($f)) {
600        echo '
601        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer2.rss");
602        ';
603        } else {
604        echo '
605        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer1.rss");
606        ';
607        }
608        echo '
609        </script>
610        </onClick>
611        <download>'.$link.'</download>
612        <tip>2</tip>
613        <name>'.$titledownload.'.flv</name>
614        </item>
615        ';
616     }
617  }
618  $last_link = $link;
619//  }
620}
621/**################ flash... mediafile,file.....############**/
622$videos = explode('flash', $html);
623unset($videos[0]);
624$videos = array_values($videos);
625foreach($videos as $video) {
626  $t1 = explode('ile=', $video);
627  $t2 = explode('&', $t1[1]);
628  $t3 = explode("'",$t2[0]);
629  $link = urldecode($t3[0]);
630  if (strpos($video,"proxy.link") !== false) { //www.seriale-filme.info ,filmeonline.org
631    $link=str_between($video,'proxy.link=','"');
632  }
633  if (($link <> "") && strcmp($link,$lastlink)) {
634     if (strpos($link, 'http://') !== false){
635        $titledownload = $pg;
636        $title=str_between($link,"http://","/");
637        $ext=".flv";
638    	$lastlink = $link;
639    	if (!preg_match($s,$link)) { //exclud link-urile care trebuie "preparate", astea trebuie sa fie in prima analiza!
640		// for sdk4.... with seek
641
642		$title=$title. " - With seek - SDK4";
643	    echo'
644	    <item>
645	    <title>'.$title.'</title>
646        <onClick>
647        <script>
648        showIdle();
649        url="'.$link.'";
650        cancelIdle();
651        streamArray = null;
652        streamArray = pushBackStringArray(streamArray, "");
653        streamArray = pushBackStringArray(streamArray, "");
654        streamArray = pushBackStringArray(streamArray, url);
655        streamArray = pushBackStringArray(streamArray, url);
656        streamArray = pushBackStringArray(streamArray, video/x-flv);
657        streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
658        streamArray = pushBackStringArray(streamArray, "1");
659        writeStringToFile(storagePath_stream, streamArray);
660        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer.rss");
661        </script>
662        </onClick>
663        <download>'.$link.'</download>
664        <tip>2</tip>
665        <name>'.$titledownload.'.'.$ext.'</name>
666        </item>
667        ';
668        if (strpos($link,"jurnaltv.ro") !==false) {
669        $title=$title."(H)";
670	    echo'
671	    <item>
672	    <title>'.$title.'</title>
673        <onClick>
674        <script>
675        showIdle();
676        url="'.$link.'";
677        cancelIdle();
678        streamArray = null;
679        streamArray = pushBackStringArray(streamArray, "");
680        streamArray = pushBackStringArray(streamArray, "");
681        streamArray = pushBackStringArray(streamArray, url);
682        streamArray = pushBackStringArray(streamArray, url);
683        streamArray = pushBackStringArray(streamArray, video/x-flv);
684        streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
685        streamArray = pushBackStringArray(streamArray, "1");
686        writeStringToFile(storagePath_stream, streamArray);
687        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer_h.rss");
688        </script>
689        </onClick>
690        <download>'.$link.'</download>
691        <tip>2</tip>
692        <name>'.$titledownload.'.'.$ext.'</name>
693        </item>
694        ';
695        }
696        }
697    	$srt1 = str_between($video,'captions.file=','&');
698    	$t1=explode('"',$srt1);
699    	$srt = $t1[0];
700    	if (strpos($srt,"http") === false) {
701           ////www.veziserialeonline.info,www.seriale-filme.info
702          $s1=explode("/",$filelink);
703          $s=$s1[2];
704          $srt="http://".$s.$srt;
705        }
706        $srt = str_replace(" ","%20",$srt);
707        $pct = substr($srt, -4, 1);
708    	if (($srt <> "") && ($pct == ".") && (strpos($srt,".srt") !==false) && (strpos($srt,"000.srt") === false) ) {
709    	$f = "/usr/local/bin/home_menu";
710	    echo'
711	    <item>
712	    <title>Play cu subtitrare</title>
713        <onClick>
714        <script>
715        showIdle();
716        dummy=getURL("http://127.0.0.1/cgi-bin/scripts/util/srt_xml.php?file='.urlencode($srt).'");
717        url="'.$link.'";
718        cancelIdle();
719        streamArray = null;
720        streamArray = pushBackStringArray(streamArray, "");
721        streamArray = pushBackStringArray(streamArray, "");
722        streamArray = pushBackStringArray(streamArray, url);
723        streamArray = pushBackStringArray(streamArray, url);
724        streamArray = pushBackStringArray(streamArray, video/x-flv);
725        streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
726        streamArray = pushBackStringArray(streamArray, "1");
727        writeStringToFile(storagePath_stream, streamArray);
728        ';
729        if (file_exists($f)) {
730        echo '
731        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer2.rss");
732        ';
733        } else {
734        echo '
735        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer1.rss");
736        ';
737        }
738        echo '
739        </script>
740        </onClick>
741        <download>'.$link.'</download>
742        <tip>2</tip>
743        <name>'.$titledownload.'.flv</name>
744        </item>
745        ';
746    	}
747    }
748  }
749} //foreach
750//http://www.filmesubtitrate.info/2010/06/10-things-i-hate-about-you-sez1-ep1.html
751//http://www.seriale.filmesubtitrate.info/2010/06/10-things-i-hate-about-you-sez1-ep1.html
752if (strpos($filelink,"filmesubtitrate.info") !== false) {
753///playerfs/plmfilmesub.php?lk=a8u25iq4cach
754//peteava - http://www.seriale.filmesubtitrate.info/playerfs/peteava.php?lk=503993
755//videoweed - http://www.seriale.filmesubtitrate.info/playerfs/plmweed.php?lk=gdubcouik7ogu&km=A.Seriale/Alcatraz%20S01E01
756//novamov - http://www.seriale.filmesubtitrate.info/playerfs/plmnova.php?lk=f6uol0yy3s2sp&km=A.Seriale/Alcatraz%20S01E01
757//vidbux - http://www.seriale.filmesubtitrate.info/playerfs/plmvidb.php?lk=e2tjkd08bok4&km=A.Seriale/Alcatraz%20S01E01
758//vidxden - http://www.seriale.filmesubtitrate.info/playerfs/plmvidx.php?lk=1798z8fap6g3/Touch_S01E01.flv.html
759$title = "";
760$f = "/usr/local/bin/home_menu";
761$videos = explode('playerfs', $html);
762unset($videos[0]);
763$videos = array_values($videos);
764foreach($videos as $video) {
765 $t1=explode('"',$video);
766 $link="http://www.seriale.filmesubtitrate.info/playerfs".$t1[0];
767
768 if (strpos($link,"plmfilmesub") !== false) $title="roshare";
769 if (strpos($link,"peteava") !== false) $title="peteava";
770 if (strpos($link,"plmweed") !== false) $title="videoweed";
771 if (strpos($link,"plmnova") !== false) $title="novamov";
772 if (strpos($link,"plmvidb") !== false) $title="vidbux";
773 if (strpos($link,"plmvidx") !== false) $title="vidxden";
774 $link="http://127.0.0.1/cgi-bin/scripts/filme/php/link.php?file=".urlencode($link);
775 if ($title <> "") {
776	    echo'
777	    <item>
778	    <title>'.$title.'</title>
779        <onClick>
780        <script>
781        showIdle();
782        movie="'.$link.'";
783        url=getUrl(movie);
784        cancelIdle();
785        streamArray = null;
786        streamArray = pushBackStringArray(streamArray, "");
787        streamArray = pushBackStringArray(streamArray, "");
788        streamArray = pushBackStringArray(streamArray, url);
789        streamArray = pushBackStringArray(streamArray, url);
790        streamArray = pushBackStringArray(streamArray, video/x-flv);
791        streamArray = pushBackStringArray(streamArray, "'.$pg_title.'");
792        streamArray = pushBackStringArray(streamArray, "1");
793        writeStringToFile(storagePath_stream, streamArray);
794        ';
795        if (file_exists($f)) {
796        echo '
797        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer2.rss");
798        ';
799        } else {
800        echo '
801        doModalRss("rss_file:///usr/local/etc/www/cgi-bin/scripts/util/videoRenderer1.rss");
802        ';
803        }
804        echo '
805        </script>
806        </onClick>
807        <download>'.$link.'</download>
808        <tip>1</tip>
809        <name>'.$titledownload.'.flv</name>
810        </item>
811        ';
812 }
813}
814}
815?>
816</channel>
817</rss>