Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hugetv
Visitor

Re: Any pointers for registration code in asp or java

"RokuJoel" wrote:
To get the code from the server, you would do something like:

xfer=createobject("roURLtransfer")
xfer.seturl("http://myserver.com/makepin.php")
screen=createobject("roCodeRegistrationScreen")
screen.addfocaltext("please visit http://myserver.com/roku to link your device")
screen.setregistrationcode(xfer.gettostring())
screen.show()


You would use checkcode.php to check if the user had entered the code. If the have then you return from your registration function with a number representing success or failure of registration, so if it returns 0 you exit your channel (because the user canceled registration), if it returns 1 you continue and display the content.

So the opening of your program might look like:


sub main()
screen=createobject("roposterscreen")
screen.show()
if register() =0 then return
screen.setcontentlist(getmyauthorizedcontent())
...


the reason for loading the Posterscreen first is to prevent the channel from exiting after successful registration.


Might cofigurar this file to work with what I stand for php and also want to see if you can register deviceID
Our system http://www.rokumanager.com
0 Kudos
hugetv
Visitor

Re: Any pointers for registration code in asp or java

register the device ID of the device and to check with the device id and status and date


CREATE TABLE IF NOT EXISTS `users` (
`firstname` varchar(50) NOT NULL DEFAULT '',
`lastname` varchar(50) NOT NULL DEFAULT '',
`email` varchar(100) NOT NULL DEFAULT '',
`password` varchar(25) NOT NULL DEFAULT '',
`deviceID` tinyint(4) NOT NULL,
`regCode` tinyint(4) NOT NULL,
`end_date` date NOT NULL,
`creation` date NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='no comment';
Our system http://www.rokumanager.com
0 Kudos
destruk
Binge Watcher

Re: Any pointers for registration code in asp or java

necromancing threads with the last reply being 2+ years old is generally frowned upon here.
0 Kudos
Komag
Roku Guru

Re: Any pointers for registration code in asp or java

I personally am a little suspicious whether this is just a clever spammer setting up legit-looking posts
0 Kudos