Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Here is what I want to do with SQL...

  1. #1
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default Here is what I want to do with SQL...

    Okay, so I have several projects going on and I seem to have spread myself a little thin, that or I am as incompetent as I thought. Either way, new ideas and projects seem to just spring into my head and older projects find new ways to need additions.

    I have a small personal project I am just starting, and if all goes well I am looking at about 1 to 1 1/2 years to completion. However, I can't move on until I get this question out of my head:

    I am going to be making a self installer for this application (it's a game) and I want a registration of sorts. Basically when you download the exe installer you will get a "password" or registration number if you will. What I would like to know is if it is possible to set up a database where those reg numbers are stored, then when you enter the number in the installer it will check the database. If the number is there it will continue the install, if it is not, it will cancel the install. Here is the bonus trick: a 3 use reg number. Meaning the number given with that particular download can be used 3 times, after the 3rd check of that number in the DB I want it deleted from the database.

    So, let's say I have the database set up with 50 registration numbers already in the tables. Then Twey downloads the game and gets the registration number: hg782-p0h48-cc419

    He will install the game and will be asked for the reg number. He enters the reg number and it checks the DB, the number is there, and so Twey gets to continue the install. He then passes the .exe and the reg number to John, who does the same thing, who then passes it on to Mike. Once Mike checks the reg number and continues install the reg number is then deleted from the database, so if Mike passes it on the next person would have to get a new registration number.

    Does that make sense? And is it possible?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I wouldn't see why it wouldn't be possible. That is if the exe (auto installer thingy) can connect to the sql database and enter information and delete information from it. Not sure how the exe thing would work though. If it is possible to connect to the database and add/remove entries from it, you oculd make the table structure like this:

    key -> used

    Example:

    hg782-p0h48-cc419 (key) -> 0 (used)

    When the installer finds the key in the db, it could check to see the number of uses (used column). If the number is 2, delete the record from the db instead of incrementing it and continue with the install. If the used number is less than 2, you oculd simply increment the number till then.

    Just some suggestions if the exe can access the db and do this kind of thing.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Yeah I am not sure of the installers capabilities either, although it has to be possible in some aspect, a lot of other installers check registration numbers. I just can't think of how. I don't know that much about SQL yet.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It is certainly possible. However, do not directly connect to the MySQL database. This would require distributing your login details along with the executable! Instead, use a separate service (HTTP will do if you can't be bothered to create a dedicated protocol).

    Also note that this isn't secure: anybody with some modicum of reverse-engineering experience can change the connection details in the executable so that it points to a different server that always returns true.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Quote Originally Posted by Twey
    Instead, use a separate service (HTTP will do if you can't be bothered to create a dedicated protocol)
    How would you create a dedicated protocol, or; in other words, what's involved with doing this? Also, how would you use HTTP protocol to get the MySQL database information? I have no use for it yet, but the knowledge is good to have for a later date.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by Twey View Post
    It is certainly possible. However, do not directly connect to the MySQL database. This would require distributing your login details along with the executable! Instead, use a separate service (HTTP will do if you can't be bothered to create a dedicated protocol).

    Also note that this isn't secure: anybody with some modicum of reverse-engineering experience can change the connection details in the executable so that it points to a different server that always returns true.
    Do you have a method that is more secure that will do the same things?

    As noted above I have time to play around with this
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    How would you create a dedicated protocol, or; in other words, what's involved with doing this?
    Writing a protocol designed specifically for the purpose of checking key validity. In this case, the only thing that need be sent is the key and some kind of ending sequence.
    Also, how would you use HTTP protocol to get the MySQL database information?
    Via a server-side language, just as one does when serving to a browser. The result would, of course, be sent as plain text or binary data rather than HTML, to avoid having to parse said markup.
    Do you have a method that is more secure that will do the same things?
    Bigger corporations than we have tried and failed.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by Twey View Post
    Bigger corporations than we have tried and failed.

    Well, over all I am not all that worried about the hackers, I know they are going to, but if I am going to offer this game for around 5 to 10 bucks, I don't want "unlimited" licenses. This idea is what I came up with off the top of my head and thought it was pretty good. But I also knew it was a first thought.

    If you (or anyone else) has other options of limiting an install to 3 licenses per download (or C.D.) install I would be open ears to them
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Ah, OK. Your idea is perfectly good so long as you're not worrying about hackers.

    I'd suspect that you'd make more money out of the game if you were to release it free and ask for donations.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    The reason for the charge is because I am offering it on C.D. Mainly the download will be like an instant thing. Like, download now so you can start playing while we mail you the C.D.

    If you know me at all you know I don't charge for anything I do on the websites, but I am not going to take a loss if this game takes off, since I will have to buy all the C.D.s and labels myself

    There will be extras as well though, so you actually get a lot for your 5 or 10 bucks, not just the game, but any and all updates, an instruction booklet, C.D., case, box, and help (for install or settings etc. probably via email or a small chat application, depending on how much time I have free when it goes public.) I want the game to be as close to you going to a software store and buying an Xbox game as possible, except you don't have to go to the store.

    Also, we have plans for a sequel, and (fingers crossed) the ability to bring characters from one to the other, etc. Those that buy the first might just get the second for free... But if we ever make any patches, new maps, lands, missions, etc you get those for free as well
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •