Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Age Verification

  • 31-03-2013 4:40pm
    #1
    Registered Users, Registered Users 2 Posts: 6,163 ✭✭✭


    Hi all.

    I'm looking for a way to verify a persons age from their input of DOB details and then start another application if the criteria are met, i.e. the person is over 18.

    Would welcome any suggestions on how to achieve this or could pay someone to do it for me.

    Thanks.

    Ken


Comments

  • Registered Users, Registered Users 2 Posts: 16,414 ✭✭✭✭Trojan


    You could code it up front end in JS/jQuery, or back end PHP etc.

    Do you really need to do the calculation? Depends on the legalities, but you might just be able to ask "Are you over 18? Yes/No", which makes coding a whole heap easier, and is just as effective as stopping underage folks (i.e. not at all) and may cover your requirements.

    Give it some thought.


  • Registered Users, Registered Users 2 Posts: 6,163 ✭✭✭ZENER


    Thanks Trojan. We've tried to convince the customer of the futility of this and have asked them to simply ask "Are you over 18? Y/N" but they are set on this silly maths lesson for users of our device.

    I had considered installing Apache and PHP on the host computer and using one of the many PHP scripts to perform the age verification but I've read of problems using shell_exec to execute programs requiring a GUI in Windows. I think it's to do with a security issue in the MS OS where it won't allow it ?

    I have limited experience of PHP but if anyone can shed some light on this I'd be grateful. As I've already said I'm prepared to pay someone to do this.

    Thanks again !

    Ken


  • Registered Users, Registered Users 2 Posts: 517 ✭✭✭omega42


    What is your preferred language, is this a website or app? let us know what your language is and Ill see if I can get code for you


  • Registered Users, Registered Users 2 Posts: 6,163 ✭✭✭ZENER


    Hi Omega42.

    We have a windows application that runs on it's own. It has a command line interface where it's possible to configure the program before it launches it's GUI.

    The age verification is something a new customer (drinks company) wants to implement before the user can continue into the Windows application. This verification will ask 3 pieces of information, Full Name, email address and DOB. The DOB will determine whether or not the user may continue, the name and email will be sent to the Windows application so that the output from it contains these details in its filename. This part is already a function of the program.

    So basically I need an interface that will:
    • Request the users name and email address and DOB.
    • Verify the users age is over 18, and if it is
    • Launch the Window program via a command line to include the username and email address.

    It doesn't matter what language is used just the end result.

    I aplogise if this seems vague (I'm not allowed to openly mention the company name or give away too much info on what the windows program is) but can give more detail in a PM should someone want to get involved.

    Thanks


  • Registered Users, Registered Users 2 Posts: 6,163 ✭✭✭ZENER


    Just checking back to see if anyone is interested in taking this on ? I need to have something to demonstrate before the end of April.

    Thanks all !

    Ken


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 517 ✭✭✭omega42


    @Zener

    It's still very vague. I could do something up in HTML and Javascript fairly handy, PHP, ASP, VB, C++

    Do you want it to intergrate into your exsisting program or is it going to be stand alone. Does it need to be complied as in an exe file, is it going to be web based etc. would need much more info, you dont have to go into the product etc just more details

    a quick google returned this
    <?php

    $minAge = 18; // You might read this from a file/database.

    $minAge *= 3600*24*365.25; // $minAge in seconds



    $html = <<< OET

    You must be 18 or older to view this site.

    <br />

    <form action="#" method="post">

    Please input your date of birth:

    <input type="text" name="dob" value="" />

    <br />

    <input type="submit" name="submit" value="Verify Age" />

    </form>

    OET;



    if(isset($_POST)){

    $birth_date = strtotime($_POST);

    if($birth_date =='')

    $birth_date = strtotime("now");

    $now = strtotime("now");

    $age = $now - $birth_date; // age is in seconds

    if($age > $minAge)

    echo "Over minimum age."; // You could use header here.

    else

    echo "Under minimum age or invalid date."; // You could use header here.

    } else

    {

    echo $html;

    }

    ?>

    PHP


  • Registered Users, Registered Users 2 Posts: 6,163 ✭✭✭ZENER


    omega42 wrote: »
    @Zener

    It's still very vague. . . .

    Would you mind if I PM you with more detail ?

    Ken


  • Registered Users, Registered Users 2 Posts: 517 ✭✭✭omega42


    sure pm me


Advertisement