View Single Post
  #10  
Old 08-05-2015, 09:15 AM
newoneeeeeeeeee newoneeeeeeeeee is offline
Junior Member
 
Join Date: Aug 2015
Posts: 6
newoneeeeeeeeee is on a distinguished road
Default

Re: Rtmp Dump Castaba.tv


Quote:
Originally Posted by biezom View Post
script in php works
i'm newbie in php so the script can be improved
you need run this script in rtmpdump folder or indicate the path of rtmpdump in line 15
this script may be shorter if the id channel doesn't change but in doubt

Code:
<?php
$php1=file_get_contents('http://typertv.com.pl/emded/polsat.php');
$cidb= strpos($php1, '"text/javascript"> id="'); $cide=strpos($php1, '"; ew='); $cidf = $cide - $cidb ; $precid= substr($php1, $cidb , $cidf);
$cid=str_replace('"text/javascript"> id="',"",$precid);
$whb= strpos($php1, 'ew="'); $whe=strpos($php1, '"; eh='); $whf = $whe - $whb ; $prewh= substr($php1, $whb , $whf);
$wh=str_replace('ew="',"",$prewh);
$htb= strpos($php1, 'eh="'); $hte=strpos($php1, '";</script><script'); $htf = $hte - $htb ; $preht= substr($php1, $htb , $htf);
$ht=str_replace('eh="',"",$preht);
$php2=file_get_contents("http://castalba.tv/embed.php?cid=$cid&wh=$wh&ht=$ht&r=typertv.com.pl");
$playpathb = strpos($php2, "'file': '"); $playpathe = $playpathb +102; $playpathf = $playpathe - $playpathb; 
$preplaypath = substr($php2, $playpathb , $playpathf); $playpath = str_replace("'file': '","",$preplaypath);
$rtmpb = strpos($php2, "streamer': '"); $rtmpe = strpos($php2, "live',"); $rtmpf=$rtmpe - $rtmpb; $prertmp=substr($php2, $rtmpb , $rtmpf);
$rtmp=str_replace("streamer': '","",$prertmp); $rtmp= $rtmp ."live";
echo "Starting vlc with rtmpdump...\n\n";
	echo shell_exec("rtmpdump -r \"$rtmp\" -a \"live\"  -p \"http://castalba.tv/embed.php?cid=$cid&wh=$wh&ht=$ht&r=typertv.com.pl\" --live -y \"$playpath\" - | \"C:\\Program Files\\VideoLAN\\VLC\\vlc.exe\" - &");
	echo "Done.\n";
?>


Hi again do You have anything simillar scriptwise for:
http://shidurlive.com/ ?

Once again thank You.

Last edited by newoneeeeeeeeee : 08-05-2015 at 10:22 AM.
Reply With Quote