Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Zapni.TV: make batch file with Zapni.TV channels for opening in VLCHello I would like to know how to make a php script for Zapni.tv channels. They use http for streaming with tickets. Here is an example: _www.zapni.tv/play.php?id=240 . My purpose is to make a batchfile with those channels.
I tried with that but it's not opening VLC in batchfile. Quote:
Last edited by karlo2105 : 10-24-2011 at 09:35 AM. |
#2
|
|||
|
|||
Re: Zapni.TV: make batch file with Zapni.TV channels for opening in VLCis the above posted code fragment your whole script? i can't see where are you even launching vlc? here is the full script which will work with vlc streams available on the site.
Code:
<?php echo "KSV ZapniTV Downloader\n"; $format = "%-8s : %s\n"; function runAsync($command) { $WshShell = new COM("WScript.Shell"); $oExec = $WshShell->Run($command, 1, false); unset($WshShell, $oExec); } if ($argc <= 1) { echo "Enter URL : "; $url = trim(fgets(STDIN)); } else $url = $argv[1]; echo "Retrieving html . . .\n"; $html = file_get_contents($url); preg_match('/<a.*?>(.*?[vlc|vlc_2].php.*?)<\/a>/i', $html, $links); if (file_exists("C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe")) $vlc = "C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe"; else $vlc = "C:\\Program Files\\VideoLAN\\VLC\\vlc.exe"; if (isset($links[1])) { $command = "\"$vlc\" \"$links[1]\""; printf($format, "Command", $command); runAsync($command); } echo "Finished.\n"; ?> Code:
http://www.mediafire.com/file/xdp7efl44fjv74f/KSV%20-%20ZapniTV.zip |
#3
|
|||
|
|||
Re: Zapni.TV: make batch file with Zapni.TV channels for opening in VLCNo I found this script on this website and I launched vlc in batchfile.
So my command was like that : Code:
%php% ZapniTV.php curl "http://www.zapni.tv/play.php?id=240" | %vlc% - So I replaced my script with yours in file ZapniTV.php. When i launch this command : Code:
call %php% ZapniTV.php Last edited by karlo2105 : 10-26-2011 at 05:55 AM. |
#4
|
|||
|
|||
Re: Zapni.TV: make batch file with Zapni.TV channels for opening in VLCin batch file the following command works for me without explicitly asking for url. my script doesn't create any junk file.
Code:
call php ZapniTV.php "http://zapni.tv/play.php?id=240" |
#5
|
|||
|
|||
Re: Zapni.TV: make batch file with Zapni.TV channels for opening in VLCThanks that's working great. ;-)
|
Tags: live, streaming, zapni, zapni tv |
Thread Tools | |
Display Modes | |
|
|