I need to write this as a PHP script that will execute a series of actions (all require just a POST request): keypress/home, launch/appid, keypress/select, keypress/right, keypress/right, keypress/select.
See below for what I came up with for one command. Two questions:
1) My Roku is not responding to this, so what am I doing wrong? 2) What’s the best way to send multiple POST requests one after the other?
Would it matter if I’m running the script on a remote web server? As long as the computer/browser that I’m executing it from is on the same network, shouldn’t it work?
“bryanharley” wrote:
Would it matter if I’m running the script on a remote web server? As long as the computer/browser that I’m executing it from is on the same network, shouldn’t it work?
If you’re using php, the code is running on the server, so it’ll only work if the server is on the same network as your Roku.
I am not a PHP witch doctor but seems to me would be good to put all that stuff from curl_init to curl_close in a procedure/function and then call it repeatedly something like
And you don’t need to hit Home before launching a channel (except maybe with screen saver, dont remember). Btw, if this is to be invoked from browser, best will be to so that without a server and server-side scripting - see how remoku.tv does it. Opening public port to home Roku is not something i’d recommend.
“bryanharley” wrote:
Someone else wrote this javascript, but I was not able to get it to work client-side in a browser. Any idea why?
I believe XDomainRequest is a IE only object, so that script will only work in Internet Explorer.