Results 1 to 8 of 8

Thread: Key And Validator

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    0

    Key And Validator

    Hi Guys, Love the forum.

    I'm just hoping to get some help on creating a key validator in VS 2010 ultimate.

    So what I've done is made a random key maker, to generate keys up to 30 characters long, for giving my customers discount codes.

    I need to know if it's possible to make a validator to go with my existing key maker so when I get a code back that I generated I then can put it into the validator to tell me whether that code has been used or not. for example: I generate a few discount codes on my discount web page, when I get them back I can check if they have been used or not.

    It sounds good in my head but am I talking absolute &*£$

    Am running win 7 prem 64bit, VS 2010 ultimate. My coding skills are very limited, new to VS 2010. Complete Noob

    Thanks in advance.

    I am BaSiC

  2. #2
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,902

    Re: Key And Validator

    It certainly doesn't sound difficult. You've basically got 3 key states: Available, Issued, Used.
    1. Create the keys you want at Avaialble state
    2. Move them to Issued state when you give them out
    3. When a key is "claimed" check it's at issued state and, if it is, move it to Used. If it's not at Issued State it either never existed or has been used already.

    N.B. You probably don't even need the Available state. Just create them at Issued when you give them out.

    You could do with thinking about what you're storage mechanism will be. It could be a text file, database, cloud storage etc.
    And you should think about how users will request, recieve and claim a key. Will it be online, will they phone you, write to you etc.

    Once you've resolved the above two questions it should be pretty obvious which technologies you need to start brushing up on.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    0

    Re: Key And Validator

    Thank you for the advise FunkyDexter, I will generate the codes using my rnd key maker and store them in a txt file, i'll post keys on my website which in turn people can use them by emailing me back the code. Now am limited in programming skills as am just starting out, so all I want to do is the codes I get back is to paste them into a, say a validator program that says the code has only been used once, making sure that they dont get used twice. Is there any skeleton code I can use and build upon that's up to doing this or do you know a easier way of doing so.

    Thank you in advance.

    I am BaSiC

  4. #4
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,902

    Re: Key And Validator

    Is there any skeleton code I can use
    Not really, or at least not that I'm aware of. You could try checking the code bank but I think you'll be lucky because you're requirement is specific to you so it's unlikely anyone else will have solved it... or at least, if they have solved it they won't have considered it to be worth posting. I'm afraid you're going to hgave to create your own skeleton on this one, but it shouldn't be too hard and there are plenty of tutorials and references out there to help you.

    It sounds like your going to be doing the checking manually. I.e. you want a little app where you can type (or cut and paste) the code into a text box, click a "Check this code" button and get an answer back, is that right. If so you need to be able to do a bit of winforms or asp development. Are you happy with the basics of either of this technologies? I'm assuming you are because you've already got your own web site but, if not, just let us know and there are plenty of tutorials out there we could point you at. Here's one for winforms that's really for complete beginners.

    Assuming you're happy with that side of things then I think the only thing you'd be likely to need help on is file handling so you can retrieve the available keys from your text file and update them when they get used. Here's a quick tutorial on that.

    Basically the best advice is, start producing something yourself. When you get stuck post a question iun the apropriate forum and you'll find plenty of folks who are ready to help. Unfortunately a question like "I want to validate keys, how do I do it?" is to big and open to get a reasonable response.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    0

    Re: Key And Validator

    Thank you again FunkyDexter, for the help and pointing me in the right direction. Your help has been good advice.

    [SOLVED]

  6. #6
    Addicted Member
    Join Date
    Mar 2007
    Posts
    183

    Re: Key And Validator

    FYI, this is not the forum for programming questions. I have reported this thread to the moderators. One of them will move this to another forum. Please keep all VS 2010 questions in that forum.
    Do not read this sentence.
    You read that last one, didn't you?
    Darn. You now read the previous two.

    Check out my pins on Pinterest!

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    0

    Re: Key And Validator

    Moonman239 Moonman239 FYI, why on earth would you take the time out of your very lame life to post your so called reply?. It was a programing question and it was answered. People on here are to help people not to discourage them, so if you cant help or in my opinion you are not capable of helping anyone then go to a forum that cares.

    Thank You.

    Mark Talbot

    (if I get band then it wont be the end of the world)

  8. #8
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,902

    Re: Key And Validator

    I don't think Moonman was meaning to tell you off. He's just letting you know that this sub forum (chit chat) is probably not the best place to get an answer to your question. Chit chat's kinda the place where we come to blow off steam, take the micky out of each other and undermine each other's political and religious views. It's a good place to hang out (as long as everyone remembers that I'm always in the right) but you were lucky to have got a sensible answer in here at all.

    That's why he's asked a moderator to move the post to a more apropriate sub-forum, probably VS2010. You're likely to get much better help in there. By "I've reported this thread to the moderators" I don't think he means "I've told teacher on you" so much as "I've let the mods know that by moving this thread you're likely to get better results". Try reading his post again with a smile in your voice and an attitude of "I'll help this guy out" and you'll realise, hopefully, that he's on your side.

    Moonman, sorry for putting words in your mouth and I hope I haven't miss-interpretted your position.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

Posting Permissions

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



Click Here to Expand Forum to Full Width