php scripts for dbox streaming via vlc - UkCvs.org
 

Go Back   UkCvs.org > Digital Tv Box Section > Dbox Section

Dbox Section All Things Dbox Here

Reply
 
LinkBack Thread Tools Display Modes
Old 07-10-2009, 05:46 PM   #1 (permalink)
Donated Member
UkCvs Member
 
Join Date: Aug 2009

Posts: 60
iTrader: (0)
Casino cash: $33350
Thanks: 36
Thanked 4 Times in 3 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Groans: 0
Groaned at 1 Time in 1 Post
YouTube php scripts for dbox streaming via vlc

hi i use vlc to stream youtube videos via scripts and i also use apache i have a problem and hope someone can help me. the script for youtube no longer works and i have no idea how to re-write it any help would be very much appriciated.
this is the old script.

$search="http://gdata.youtube.com/feeds/api/videos?vq=%string%&start-index=%index%&max-results=50&orderby=%orderby%";



$links['Top 10']['url']="http://gdata.youtube.com/feeds/api/standardfeeds/top_rated";
$links['Karaoke']['suche']="Karaoke";
$links['60s']['suche']="60s";
$links['70s']['suche']="70s";
$links['80s']['suche']="80s";
$links['90s']['suche']="90s";
$links['Clubland']['suche']="Clubland";
$links['Old Skool']['suche']="Old Skool";
$links['Floorfillers']['suche']="Floorfillers";
$links['Hits']['suche']="Hits";
$links['Charts']['suche']="Charts";
$links['Dance']['suche']="Dance";
$links['Kenny Rogers']['suche']="Kenny Rogers";
$links['Faith Hill']['suche']="faith hill";
$links['Neil Diamond']['suche']="Neil Diamond";
$links['Remixes']['suche']="Remix";
$links['Movie Trailers']['suche']="mall cop";
$links['Funny']['suche']="Funny";
$links['Happy Hardcore']['suche']="Happy Hardcore";
$links['Love']['suche']="love";
$links['Beatles']['suche']="Beatles";
$links['Meatloaf']['suche']="Meatloaf";
$links['Dr Hook']['suche']="Dr Hook";
$links['']['suche']="";
$links['']['suche']="";

$seite['Page 01']['nr']=0;
$seite['Page 02']['nr']=1;
$seite['Page 03']['nr']=2;
$seite['Page 04']['nr']=3;
$seite['Page 05']['nr']=4;
$seite['Page 06']['nr']=5;
$seite['Page 07']['nr']=6;
$seite['Page 08']['nr']=7;
$seite['Page 09']['nr']=8;
$seite['Page 10']['nr']=9;

$orderby['Sort By Relevance']['api']="Relevance";
$orderby['Sort By Newest']['api']="updated";
$orderby['Sort By Hits']['api']="viewCount";
$orderby['Sort By Raiting']['api']="rating";

function dlflv($url) {
#echo $url; exit;
$page = cacheurl($url,false);
# preg_match('!<title>(.*?)</title>!', $page, $matches);
# preg_match('!video_id=.*&t=[^\"&]*!', $page, $matches);
preg_match('|video_id": "(.*?)"(?:.*?)"t": "(.*?)"|i', $page, $matches);
# print_r($matches); exit;


$video ="http://www.youtube.com/watch?v=video-id=?".$matches[1]."&t=".$matches[2];
# $video = 'http://www.youtube.com/watch?v?'.$matches[0];
return $video;
}

function input($url,$pos="") {
$t_html = cacheurl($url,false);
preg_match_all('/<entry>(.*?)<\/entry>/si',$t_html,$row);
foreach ($row[1] as $mov) {
preg_match('/<title (.*?)>(.*?)<\/title>/i', $mov, $matches); $tmp_array['title'] = filterstr($matches[2]);
preg_match("/<link(.*?)href='(.*?)'\/>/i", $mov, $matches); $tmp_array['url'] = $matches[2];
preg_match("/<content(.*?)>(.*?)<\/content>/i", $mov, $matches); $tmp_array['details'] = $matches[2];
preg_match("/duration seconds='(\d+)'/i", $mov, $matches); $tmp_array['size'] = $matches[1];
preg_match("/<published>(.*?)<\/published>/is", $mov, $matches); $tmp_array['time'] = strtotime($matches[1]);
# $tmp_array['size']=$tmp_array['dauer']*80000;
$tmp_array['type']="file";
if ($pos!="") {
$txt=md5($pos."/".$tmp_array['title']);
if (file_exists("fav/".$txt)) $tmp_array['title']="x".$tmp_array['title'];
}
$out[$tmp_array['title']]=$tmp_array;
}

return $out;
}

function getdir() {
global $links,$orderby,$search,$seite;
$r=split("/",trim($_GET['dir'],"/"));

if (count($r)==2) {
return gennavi($links);
}

if (count($r)==3) {
$ar=$links[$r[2]];
if (isset($ar['suche'])) {
return gennavi($orderby);
} else {
return gennavi(input($ar['url']));
}
}


if (count($r)==4) {
return gennavi($seite);
}

if (count($r)==5) {
$ar=$links[$r[2]];
$index=$seite[$r[4]]['nr']*50+1;
$ur= str_replace("%string%",urlencode($ar['suche']),$search);
$ur= str_replace("%orderby%",$orderby[$r[3]]['api'],$ur);
$ur= str_replace("%index%",$index,$ur);
return gennavi(input($ur,implode("/",$r)));
}


}


function geturl($pfad) {
global $links,$search,$orderby,$seite;
$r=split("/",trim($pfad,"/"));

#youtube suche
if(count($r)==6) {
$index=$seite[$r[4]]['nr']*50+1;
$ur= str_replace("%string%",urlencode($links[$r[2]]['suche']),$search);
$ur= str_replace("%orderby%",$orderby[$r[3]]['api'],$ur);
$ur= str_replace("%index%",$index,$ur);
$ar=input($ur,implode("/",$r));
d_write("fav/".md5(implode("/",$r))," ");
$key=$r[5]; if (!isset($ar[$key])) $key=substr($key,1);
return dlflv($ar[$key]['url']);
}
#Standardlinks
$in=input($links[$r[2]]['url']);
$t=stripslashes($r[3]);
return dlflv($in[$t]['url']);
}

function filterstr($text) {
$text = preg_replace('/[^a-zA-Z0-9\- .\!\?()]/', "", $text);
$text = preg_replace("/ +/", " ", $text);
$text = trim($text);
return $text;
}

?>
wullieb25 is offline   Reply With Quote
Old 07-10-2009, 06:27 PM   #2 (permalink)
Moderator
UkCvs Senior Member
 
pt-1's Avatar
 
Join Date: Sep 2008

Posts: 350
iTrader: (0)
Casino cash: $146980
Thanks: 105
Thanked 379 Times in 171 Posts
Nominated 10 Times in 3 Posts
Nominated TOTW/F/M Award(s): 2
Groans: 0
Groaned at 0 Times in 0 Posts
pt-1 is offline   Reply With Quote
The Following 2 Users Say Thank You to pt-1 For This Useful Post:
Tyke (08-10-2009), wullieb25 (16-10-2009)
Old 16-10-2009, 08:50 AM   #3 (permalink)
Donated Member
UkCvs Member
 
Join Date: Aug 2009

Posts: 60
iTrader: (0)
Casino cash: $33350
Thanks: 36
Thanked 4 Times in 3 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Groans: 0
Groaned at 1 Time in 1 Post
Default
av tryed the new scripts mate there not working
wullieb25 is offline   Reply With Quote
Old 16-10-2009, 10:43 AM   #4 (permalink)
Moderator
UkCvs Senior Member
 
FreddyFr0g's Avatar
 
Join Date: Sep 2008

Posts: 353
iTrader: (0)
Casino cash: $118297
Thanks: 185
Thanked 334 Times in 207 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Groans: 1
Groaned at 0 Times in 0 Posts
Default
Quote:
Originally Posted by pt-1 View Post
Is that the same set of scripts that I tried to modify to get BBC iplayer (which worked for ... a few days!)? Did he improve it? Hummmm, I must re-visit that one!
FreddyFr0g is offline   Reply With Quote
The Following User Says Thank You to FreddyFr0g For This Useful Post:
Satsearching (16-10-2009)
Old 16-10-2009, 02:21 PM   #5 (permalink)
Yorkshire Git Admin
Team-UkCvs Senior Member
 
Satsearching's Avatar
 
Join Date: Aug 2008
8 Highscores

Location: Here
Posts: 1,568
iTrader: (0)
Casino cash: $528332
Thanks: 659
Thanked 1,441 Times in 722 Posts
Nominated 11 Times in 4 Posts
Nominated TOTW/F/M Award(s): 4
Groans: 2
Groaned at 0 Times in 0 Posts
Default
That would be mega cool freddy, would give the box a new life!
__________________

Download Our Toolbar Now !!
DBOX HELPFILE HERE

Any information provided on this site is not guaranteed in any way. Some articles may discuss topics that are illegal, so this information is provided for educational purposes only, use at your own risk !! NO TO SKY AND F1, BBC WAKE UP! HELLO RTL!
Satsearching is online now   Reply With Quote
Old 16-10-2009, 05:27 PM   #6 (permalink)
Nagging Old Git
Team-UkCvs Senior Member
 
PaphosAL's Avatar
 
Join Date: Aug 2008

Location: A park bench, near you
Age: 75
Posts: 3,108
iTrader: (0)
Casino cash: $848260
Thanks: 2,645
Thanked 1,586 Times in 876 Posts
Nominated 2 Times in 2 Posts
Nominated TOTW/F/M Award(s): 2
Groans: 1
Groaned at 0 Times in 0 Posts
Default
Good point, SS! If all is soon to be lost on dBox2 (according to all the prophets of doom) - then BBC iPlayer via the red button would be a salvation, LOL!

Yes, I know this works on my subbed box, but it would open the feature to the other rooms here with dBox2 as well. I ain't paying VM for a second or third rental box, LOL!

AL
PaphosAL is offline   Reply With Quote
Old 16-10-2009, 05:38 PM   #7 (permalink)
Yorkshire Git Admin
Team-UkCvs Senior Member
 
Satsearching's Avatar
 
Join Date: Aug 2008
8 Highscores

Location: Here
Posts: 1,568
iTrader: (0)
Casino cash: $528332
Thanks: 659
Thanked 1,441 Times in 722 Posts
Nominated 11 Times in 4 Posts
Nominated TOTW/F/M Award(s): 4
Groans: 2
Groaned at 0 Times in 0 Posts
Default
Yup, I got to admit, I spend more time using iplayer than anything else. The BBC does get some things right, and iplayer is a prime example!

I'm almost happy to pay TV Licence just for iplayer.

(me trots off to watch Never Mind The Buzzcocks on iplayer that I missed this week)

SS

Quote:
Originally Posted by PaphosAL View Post
Good point, SS! If all is soon to be lost on dBox2 (according to all the prophets of doom) - then BBC iPlayer via the red button would be a salvation, LOL!

Yes, I know this works on my subbed box, but it would open the feature to the other rooms here with dBox2 as well. I ain't paying VM for a second or third rental box, LOL!

AL
__________________

Download Our Toolbar Now !!
DBOX HELPFILE HERE

Any information provided on this site is not guaranteed in any way. Some articles may discuss topics that are illegal, so this information is provided for educational purposes only, use at your own risk !! NO TO SKY AND F1, BBC WAKE UP! HELLO RTL!

Last edited by Satsearching; 16-10-2009 at 05:44 PM..
Satsearching is online now   Reply With Quote
Old 17-10-2009, 09:12 PM   #8 (permalink)
Moderator
UkCvs Senior Member
 
FreddyFr0g's Avatar
 
Join Date: Sep 2008

Posts: 353
iTrader: (0)
Casino cash: $118297
Thanks: 185
Thanked 334 Times in 207 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Groans: 1
Groaned at 0 Times in 0 Posts
Default
Quote:
Originally Posted by PaphosAL View Post
Good point, SS! If all is soon to be lost on dBox2 (according to all the prophets of doom) - then BBC iPlayer via the red button would be a salvation, LOL!

Yes, I know this works on my subbed box, but it would open the feature to the other rooms here with dBox2 as well. I ain't paying VM for a second or third rental box, LOL!

AL
Wouldn't be exactly as the red button since you'll need the movie player and apache+vlc running on separate box but close enough! The good news as well is that C4 has agreed a deal with youtube... which is already accessible with those scripts.
FreddyFr0g is offline   Reply With Quote
The Following User Says Thank You to FreddyFr0g For This Useful Post:
renwich (17-10-2009)
Old 23-10-2009, 03:02 PM   #9 (permalink)
Donated Member
UkCvs Member
 
Join Date: Aug 2009

Posts: 60
iTrader: (0)
Casino cash: $33350
Thanks: 36
Thanked 4 Times in 3 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Groans: 0
Groaned at 1 Time in 1 Post
Default
thanks AL i heard thru the grapevine that there supposed to be down for xmas from a vm employee but he says this time we may not get them back up and running again do you have any info on this as i havnt heard anythin else about it till you mentioned it

keep up the good work buddy
wullieb25 is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:53 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Any information provided on this site is not guaranteed in any way. Some articles may discuss topics that are illegal, so this information is provided for educational purposes only, use at your own risk !! Ukcvs.org cannot be held responsible for the content of any post on this forum.