Quote:
Originally Posted by Hackoo
Thank you -D3n1s- for your help and for the nice share
Keep up the good work man and i like your scripts because they help me so much to understand what's going on into the urls and inside their sources 
|
hi
a beginning for your channel
maybe need adapt rtmpdump and vlc path
Code:
<?php
$windows = strncasecmp(php_uname('s'), "Win", 3) == 0 ? true : false;
if ($windows) {
if (file_exists("C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe")) {
$vlc = "C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe";
} else if (file_exists("C:\\Program Files\\VideoLAN\\VLC\\vlc.exe")) {
$vlc = "C:\\Program Files\\VideoLAN\\VLC\\vlc.exe";
} else {
$vlc = "C:\\Programmi\\VideoLAN\\VLC\\vlc.exe";
}
} else {
$vlc = "vlc";
$out = "2>/dev/null";
}
$html=str_replace("php","html","http://iptv-planet.com/attounsiya.php");
$html1=file_get_contents($html);
preg_match("/file='(.*?)'/", $html1, $id);
echo "$id[1]\n\n";
$ch = curl_init ("http://embed.iptv-planet.com/embed.php?id=$id[1]");
curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.4.0');
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_REFERER, "http://iptv-planet.com/");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$source = curl_exec ($ch);
curl_close($ch);
preg_match("/'file': '(.*?)'/", $source, $playpath);
echo "$playpath[1]\n\n";
echo "Starting vlc with rtmpdump...\n\n";
echo shell_exec("rtmpdump -r \"rtmp://web1.iptv-planet.com:1937/live2\" -a \"live2\" -f \"LNX 17,0,0,134\" -W \"http://embed.iptv-planet.com/swfs/player.swf\" -p \"http://embed.iptv-planet.com/embed.php?id=$id[1]\" --live -y \"$playpath[1]\" - | \"$vlc\" - &");
echo "Done.\n";
?>