Probably way off base here but I am trying to communicate with a WDTV Live so that the actions on the Roku can control the other device. I have the code working on the WDTV from a web browser so I just need to send the same instruction from the roku
The code I use is:
http://192.168.2.2/tmp/rokuRemote.php?button=&button=[then what ever action I have defined in the php script on the wdtv]
For example sending :
http://192.168.2.2/tmp/rokuRemote.php?button=&button=r emulates a right click on the remote control.
The problem I have is authorizing the communication. Using
http://192.168.2.2 on a web browser produces a request for a user name and password (in this case they are both wdlxtv). I have tried to send this from a Script on the Roku using
Function AuthorizeCommsForWdtvControl(url As String)
http = CreateObject("roUrlTransfer")
http.SetUrl(url)
ba = CreateObject("roByteArray")
ba.FromAsciiString("wdlxtv:wdlxtv")
http.AddHeader("Authorization", "Basic " + ba.ToBase64String())
End Function
but I get nothing back from the Print http.GetToString() so clearly I am looking at this problem incorrectly as I expected some form of a request then to send the authorization details (I think this is using basic authorization). Another thread
viewtopic.php?f=34&t=34721 mentioned a similar issue but that was using SSL and a https url which I do not believe is the case in this circumstance.
Is there a way to accomplish this in a script?