If you want to handle the server-side operations yourself instead of using the free WordPress plugin, here's the API:
http://ex.irchan.com/docs/irc_reg_and_link.pdfThe Roku device writes the
registration file to an S3 bucket and then displays a code on the TV screen that's actually the name of the file that it just wrote. Then the server uses that same code, provided by the subscriber, to read the
registration file. Inside the
registration file, among other things, is a token that is used as the filename of the
linking file that the server writes to another S3 bucket. The Roku device knows what the token is (since it provided it to the server in the first place), and it uses the token to read its
linking file from the S3 bucket. The
linking file contains instructions from the server indicating whether or not the protected video is allowed to be played, whether or not to delete the token (subscriber didn't pay their bill) or an optional message to display to the subscriber.
You'll need to customize the
linking file to match what's in the
registration file, you can't just copy the example from the docs. At a minimum you'll have to name it the same as the token provided by the Roku device in the
registration file.
The files in the
account bucket are specific to the WordPress plugin. They allow the plugin to match up the files in the linking bucket to the WordPress login ID of the customers they belong to. The
account files aren't written to or read by the Roku device, and if you aren't using the provided WordPress plugin then they aren't needed at all.
There IS sample server-side code provided on the Instant TV Channel documentation page at
http://www.InstantTvChannel.com/roku/wordpress. Here's the link to the code:
http://ex.irchan.com/wp_irchan.zip. It's non-obfuscated PHP with hopefully enough comments to let you know how it works. I think the API document will probably be more helpful than the code if you aren't using WordPress. The sample code is somewhat minimal, you might want to add a more extensive reporting system or integrate it directly into your subscriber management system.
- Scott
www.InstantTvChannel.com / www.InstantSubtitles.com - 717-441-4386 - Build a Roku SDK channel in 15 minutes! Easily and inexpensively generate subtitles!