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

Login:
Pass:
 
 

Topic:
internet page
This thread has 4 replies. Displaying all posts.
Post 1 made on Wednesday August 20, 2014 at 11:21
nohed
Lurking Member
Joined:
Posts:
August 2014
7
a script to open a internet page how would it look in a tsu 9600

i whant to send this

[Link: 10.10.10.105]

Last edited by nohed on August 20, 2014 13:55.
Post 2 made on Saturday August 23, 2014 at 23:26
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,996
Here is one example that will get you started.

[Link: remotecentral.com]

Now, this thread has an example only sends commands and does not consume the HTML or XML response.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 3 made on Monday August 25, 2014 at 15:11
nohed
Lurking Member
Joined:
Posts:
August 2014
7
thanks for interesting reading but still can not get it to work with my address.

might be completely wrong

////////////////////////////////////////////
//
each socket = new TCPSocket (false);
socket.onConnect = function ()
{
socket.write ("GET / http: //@10.10.10.105/api/callAction? DeviceID = 36 & name = turnoff HTTP / 1.1 \ r \ n \ r \ n")
socket.close ();
};
socket.onClose = function ()
{
};
socket.onIOError = function (e)
{
label = "Error:" + e;
};
Socket.connect ('10 .10.10.105 ', 80);
//
//
/////////////////////////////////////////////
Post 4 made on Monday August 25, 2014 at 19:24
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,996
You are close but filled with syntax errors and extra spaces. Missed variable declarations, etc... You could have seen this by putting a Try/Catch block around lots of your stuff (I have a thread on debugging tips here in the forum).

Remove the extra spaces and added the Connection and Host Request Headers. You might want to consider playing with the Philips HTTP Library script that is available for PEP2 projects. Makes easier work of what I just did here.

Paste the following as-is into a button script and see if it works without any user authentication.

////////////////////////////////////////////
//
var socket = new TCPSocket (false);
socket.onConnect = function ()
{
socket.write ("GET /api/callAction?deviceID=36&name=turnoff HTTP/1.1\r\nConnection: close\r\nHost: 10.10.10.105\r\n\r\n\r\n");
socket.close ();
};
socket.onClose = function ()
{
};
socket.onIOError = function (e)
{
Diagnostics.log("Error:" + e);
};
// You were never connecting because you had 'S' instead of lowercase 's' in socket.
socket.connect ('10.10.10.105 ', 80);
//
//
/////////////////////////////////////////////

There is a piece of software known as the Burp proxy (google it) which you can configure in IE or other browser that will allow you to see the exact characters being sent by your browser. You will want to emulate that exactly by building and sending the correct strings.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 5 made on Thursday September 11, 2014 at 12:50
nohed
Lurking Member
Joined:
Posts:
August 2014
7
thank you for taking your time to me but I'm going crazy nothing happens when I pasting this in my button


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse