Quote:
Originally Posted by kjvnasa
Thanks for your answer. I tried everything you wrote and it works perfectly. You got me all curious when you said you could write a script to make it update automatically... Is it hard to do? How would i go about doing this?(where would i start?)
|
hi
example of php script
Code:
<?php
$opts1 = array(
'http'=>array(
'method'=>"GET",
'header'=>"Referer: http://www.zahitvstation.com/\r\n" .
"User-Agent: Mozilla/5.0 (A (X11; Linux i686; rv:40.0) Gecko/20100101 Firefox/40.0 Iceweasel/40.0.3"
)
);
$source1= file_get_contents('http://www.janjuaplayer.com/embedplayer/cnnkxsm/1/600/400', false, stream_context_create($opts1));
preg_match("/(pk=.*)'/", $source1, $pk);
echo "$pk[1]\n";
$source2= file_get_contents('http://www.janjuapublisher.com:1935/loadbalancer');
preg_match("/redirect=(.*)/", $source2, $ip);
echo "$ip[1]\n";
echo "Starting vlc with rtmpdump...\n\n";
echo shell_exec("rtmpdump -r \"rtmp://$ip[1]/live\" -a live -f \"LNX 19,0,0,207\" -W \"http://www.janjuaplayer.com/resources/scripts/eplayer.swf\" -p \"http://www.janjuaplayer.com/embedplayer/cnnkxsm/1/600/400\" --live -C S:OK -y \"cnnkxsm?id=46549&$pk[1]\" | vlc - &");
echo "Done.\n";
?>