View Single Post
  #7  
Old 08-04-2015, 04:39 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


Hi biezom,

Have You tried with this stream?

I can not run it on outside server but just trying it on localhost.

I have copied, rtmpdump, and vlc files to my D:/xampp/htdocs/ folder
so rtmpdump and vlc are there too.

Modified this script but it seems to not working at all.. hmm.. it gets path for video but wont run rtmpdump or vlc.

Code:
<?php
//phpinfo();
    echo "exec is enabled\r\n";
	$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...\r\n";
	echo "RESULT = D:/xampp/htdocs/rtmpdump.exe -r \"$rtmp\" -a \"live\"  -p \"http://castalba.tv/embed.php?cid=$cid&wh=$wh&ht=$ht&r=typertv.com.pl\" --live -y \"$playpath\" - | \"D:/xampp/htdocs/vlc.exe\" - &";
	echo shell_exec(\"D:/xampp/htdocs/rtmpdump.exe -r \"$rtmp\" -a \"live\"  -p \"http://castalba.tv/embed.php?cid=$cid&wh=$wh&ht=$ht&r=typertv.com.pl\" --live -y \"$playpath\" - | \"D:/xampp/htdocs/vlc.exe\" - &");
	echo "Done.\r\n";
?>
I have tried if exec command will work with whoami. And it shows result so i am sure exec() its working, with result line i have checked if whole page has been taken and playpath rtmp file an live has been taken correctly, and i am sure it did, can you try on Your server if it works??
Reply With Quote