Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 4 made on Saturday December 22, 2007 at 09:00
snelvuur
Long Time Member
Joined:
Posts:
November 2007
55
Still needs more work, will add word wrapping to it when i have the time. (following lyndels advise on some wrapping then)

This snippet will show you the current and the next item what is on the dreambox. I have this on my main tv screen on the pronto. Also have a button which shows the relevant info about the show that is playing. Which is basicly the same like below code, if someone wants that too let me know.

Change the ip, and make sure your pronto is allowed to go to the website withou authorisation. Hope this works on other dreamboxes too (depending on your build)

Eric

var result = "";
var socket = new TCPSocket(false);
var t1,t2,t3,t4,t5;
var event1,event2;
var descrip1, descrip2;

socket.onConnect = function()
{
socket.write("GET /cgi-bin/channelinfo HTTP/1.1\r\n");
socket.write("Accept: */*\r\n");
socket.write("Host: 192.168.1.99\r\n");
socket.write("\r\n");
};

socket.onData = function()
{
result += socket.read(5000,1000);

t0 = result.indexOf("class=\"time\">", 0)+13;
t10 = result.indexOf("/span>",t0)-1;
tijd1 = result.substring(t0,t10);

t1 = result.indexOf("class=\"event\">", 0)+14;
t2 = result.indexOf("/span>",t1)-1;
event1 = result.substring(t1,t2);
CF.widget("channel1").label=event1;

t4 = result.indexOf("class=\"description\">", t2)+20;
t5 = result.indexOf("/span>",t4)-1;

t6 = result.indexOf("class=\"event\">", t5)+14;
t7 = result.indexOf("/span>",t6)-1;
event2 = result.substring(t6,t7);
CF.widget("channel2").label=event2;

};


socket.onClose = function()
{
};


socket.onIOError = function(e)
{
};


if(socket.connected == false)
{
socket.connect('192.168.1.99', 80, 3000);
};


Hosting Services by ipHouse