Posted 09 January 2015 - 09:29 AM
Hi everyone,
Recently I have seen a grow in topics based upon standardising a set of protocols. So I thought I might try and offer some assistance.
I have a web server with a few php scripts that I use for my program, especially self-updating programs, so I wouldn't mind making a database that we can all use, and set it up so we are able to have multiple tables, that can be accessed, my server is never down, in one way I have had it for 2 years and it has never gone down once! Only if I am upgrading and that doesn't affect the actual server, just more the content on the dynamic pages.
So here is what I propose, let me set up a PHP script (or two) that allow users to access say an open system that everyone can use.
Example:
We have a user table that stores:
+ UserID
+ Username
+ Password (sha256 hashed)
+ Email Address
+ Recovery Code
+ Group
Now an API allows users to access different parts of the 1 php script, for example, the API, when posting data will specify a system type (email client, users table, etc.)
The API will be like (for user database):
ccdb.user.login(username, password)
ccdb.user.register(username, password, Email Address)
ccdb.user.delete(username, password)
ccdb.user.recover(username)
ccdb.user.view(username, password)
ccdb.user.group(username, password)
The login of course will allow you to login, giving you a boolean: true or false on whether you exist or not.
The register will allow you to add yourself to the database.
The delete will allow you to delete your own account.
The recover option is the best one but when a valid email address is supplied, the PHP script will generate a random hash, this in turn will be saved to the Recovery Code field in the users table, then an email will be sent out that will give you that script. You use the email instead of a password and you get the option to change your password.
The view will return all your data that is stored.
The group option is a new one that will allow people to give users a group, of course this should be a checksummed value so no one else can get the same group, this can be used in your programs for checking what type of permission you are etc.
All these options have to be supplied a password so no one can get into your data.
Of course these are changable and options can be added just please tell me your ideas and let me implement them as I would love to host the database as I work with PHP in my job.
Another thing is we shall make a web version for users that can't get to a ComputerCraft emulator or minecraft.
Anyway, please post your ideas as if we all follow the same rules, it means we can all share a database instead of having to register for each program!
Any more in-depth questions PM me.
Recently I have seen a grow in topics based upon standardising a set of protocols. So I thought I might try and offer some assistance.
I have a web server with a few php scripts that I use for my program, especially self-updating programs, so I wouldn't mind making a database that we can all use, and set it up so we are able to have multiple tables, that can be accessed, my server is never down, in one way I have had it for 2 years and it has never gone down once! Only if I am upgrading and that doesn't affect the actual server, just more the content on the dynamic pages.
So here is what I propose, let me set up a PHP script (or two) that allow users to access say an open system that everyone can use.
Example:
We have a user table that stores:
+ UserID
+ Username
+ Password (sha256 hashed)
+ Email Address
+ Recovery Code
+ Group
Now an API allows users to access different parts of the 1 php script, for example, the API, when posting data will specify a system type (email client, users table, etc.)
The API will be like (for user database):
ccdb.user.login(username, password)
ccdb.user.register(username, password, Email Address)
ccdb.user.delete(username, password)
ccdb.user.recover(username)
ccdb.user.view(username, password)
ccdb.user.group(username, password)
The login of course will allow you to login, giving you a boolean: true or false on whether you exist or not.
The register will allow you to add yourself to the database.
The delete will allow you to delete your own account.
The recover option is the best one but when a valid email address is supplied, the PHP script will generate a random hash, this in turn will be saved to the Recovery Code field in the users table, then an email will be sent out that will give you that script. You use the email instead of a password and you get the option to change your password.
The view will return all your data that is stored.
The group option is a new one that will allow people to give users a group, of course this should be a checksummed value so no one else can get the same group, this can be used in your programs for checking what type of permission you are etc.
All these options have to be supplied a password so no one can get into your data.
Of course these are changable and options can be added just please tell me your ideas and let me implement them as I would love to host the database as I work with PHP in my job.
Another thing is we shall make a web version for users that can't get to a ComputerCraft emulator or minecraft.
Anyway, please post your ideas as if we all follow the same rules, it means we can all share a database instead of having to register for each program!
Any more in-depth questions PM me.