Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
hugetv
Level 7

Any pointers for registration code in php

Hi I want to achieve to make a record with php for my channel so to have control on access roku I have this in a mysql table


CREATE TABLE `device` (
`id` int(11) NOT NULL auto_increment,
`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 (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


I want to create a code where you can record data roku to mysql so then check for mysql to allow access if there blockea access so require activation again want to activate with the code that generates send the registration roku which like these

deviceID
regCode

and to check for expired or if serious about it

deviceID
end_date

I have this code to generate the

regcode.php

<?php
$random = rand(1679616, 60466175);
print base_convert($random,10,36);
?>


I would fail the regScreen.brs php file and for consultation and data logging


I hope averme esplicado good time since I've been trying to get success in my order thanks first and foremost :roll: :roll:
Our system http://www.rokumanager.com
0 Kudos
5 Replies
hugetv
Level 7

Re: Any pointers for registration code in php

I hope I explained well as it took time trying to get success in my order thanks to nothing
Our system http://www.rokumanager.com
0 Kudos
destruk
Level 10

Re: Any pointers for registration code in php

It doesn't need to be that complex. Every time you give out a code log it to your code table with the user id token.
When they enter the code on your site, remove all the tokens you have given out with that id token from the code table and add the info you want to your 'users table'.

Once you have that working you can then deal with whatever else data you want to deal with like first names, last names, t-shirt size, coupons, subscriptions, dates, rentals, logging, emails, etc etc etc.
0 Kudos
hugetv
Level 7

Re: Any pointers for registration code in php

"destruk" wrote:
It doesn't need to be that complex. Every time you give out a code log it to your code table with the user id token.
When they enter the code on your site, remove all the tokens you have given out with that id token from the code table and add the info you want to your 'users table'.

Once you have that working you can then deal with whatever else data you want to deal with like first names, last names, t-shirt size, coupons, subscriptions, dates, rentals, logging, emails, etc etc etc.


if it will help me with that I'd appreciate it very much
Our system http://www.rokumanager.com
0 Kudos
destruk
Level 10

Re: Any pointers for registration code in php

0 Kudos
hugetv
Level 7

Re: Any pointers for registration code in php

already been using it and testing it but does not work for me to do what I want
Our system http://www.rokumanager.com
0 Kudos