. **************************************************************************/ /************************************************************************** Files in this directory 'talk' to v2Yahdr via http. Put them somewhere where only your localnet hast acess to, preferably the same host as v2Yahdr runs on, as we then can simply connect to 'localhost'. Some sort of storage for eg. a 'Favourites' list is needed, sqlite comes in handy here ;-) These files are the part you should modify to suit your need's, if you don't want to poke around the C-source. As I'm not a php/html/css genius my example files here will look ugly and/or clumsy at best, feel free to help :-) ***************************************************************************/ include "globs.php"; $fav = file("./favourites.txt",FILE_SKIP_EMPTY_LINES | FILE_IGNORE_NEW_LINES); function set_channel($name) { global $yserv; echo "call:$yserv/tuneto=$name"; $f = fopen("$yserv/tuneto=$name","r"); if($f == 0) return; $res = stream_get_contents($f); echo "result: ".$res."
"; fclose($f); } function get_nownext($name) { global $yserv; $f = fopen("$yserv/nownext=$name","r"); if($f == 0) { echo "URLopen failed @ get_nownext()
"; return; } $blob = stream_get_contents($f); $recs = explode("@NR@",$blob); return $recs; } ?> v2Yahdr - Start page "> "; $p = 0; foreach($fav as $prog) { echo ""; echo ""; echo "
$prog

"; echo "EPG"; echo "
"; $recs = get_nownext($prog); for($i = 0; $i != 2; $i++) { $data = explode("@SEP@",$recs[$i]); echo ""; echo "
"; echo date("G:i",$data[1]); echo "
".($data[2]/60)." min."; echo "
"; echo "".$data[3]."
"; if(strlen($data[4])) { echo "(".$data[4].")
"; } //echo "
"; if(strlen($data[5])) { echo "
-->
"; echo str_replace("\n","
",$data[5])."
"; } echo "
"; $p++; } echo ""; } ?>