The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 6 of 6

Thread: Prevent Auto Click by PHP?

  1. #1

    Prevent Auto Click by PHP?

    I want to create a web app.
    User will have an account with a link look like : mysite.com/user.php?user=19846

    If anyone click on their links, they will get points

    But how to prevent using softwares which can click on their banner automatically.
    The first time, i think it should use session, cookie, or defining IP ($_SEVER[]) but all of them are useless (they can change IP, delete cookie easily) !!!
    I don't know what i can do ????
    Last edited by vietskynet; January 19th, 2008 at 06:46 AM.
    Minh Viet Tour : http://minhviettour.com : Vietnam Tourism , Best Tour in Vietnam , Best Vietnam Travel
    Tour Guide Viet Nam : http://taonhanpho.com

  2. #2
    In the user database store the last time they clicked the link in a column using the time() function.
    Then when they visit the link check like so:
    PHP Code:
    // $user pulled from database
    if(!$user['lasttime'] > time() + 1200) {
    // too soon
    exit("Sorry, you've done it tooooo fast");
    } else {
    // give emm some points

    That may be hard to follow, but you should get it.
    The +1200 is the amount of time they have to wait to click again.
    Web Design and Web Development blog
    Designer Notice: Browser List for design compatibility

  3. #3
    Thanks
    But people who click to the link are guest, so i can only define them by IP
    And they can change their IP easily.
    Minh Viet Tour : http://minhviettour.com : Vietnam Tourism , Best Tour in Vietnam , Best Vietnam Travel
    Tour Guide Viet Nam : http://taonhanpho.com

  4. #4
    He means for each value of ?user=xxxx keep track of the last time they clicked and then limit how fast they can accumulate points.

  5. #5
    Okay I think I understand.
    Couldn't you use my approach but put the user id from the $_GET into the database?
    Web Design and Web Development blog
    Designer Notice: Browser List for design compatibility

  6. #6
    Yes,you have an account with your ID, and when someone click on your link http://www.mysite.com/index.php?user=12345
    The system will run this query"
    UPDATE tbl_user SET point=point+1 WHERE userid='".$user."'
    and if you are a bad user ^_^ (exp), you will use software that call Fake IP to change your IP, and then , you click on your link => you get points
    I can't limit time between two clicks because two, three, four or some people can click on your link simultaneously
    Minh Viet Tour : http://minhviettour.com : Vietnam Tourism , Best Tour in Vietnam , Best Vietnam Travel
    Tour Guide Viet Nam : http://taonhanpho.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012