NameSilo

[PHP] Clicking Script

Spaceship Spaceship
Watch

chronic

Established Member
Impact
1
Hi, I am in need for help with a script I am making which does the following:

Someone clicks a personalized link for someone that is created when that person signs up. When the link is clicked, I need it to give the user +1 clicks or something of the sort. The problem I have is I want it made so that the same person can only click the link every 15 minutes.

Anyone have some ideas? I don't have much to offer since I am new but if anyone can point me to some tutorials or something, that would be great.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
use php cURL for automated clicking of links. use mysql to store usernames/passwords in a table etc . and another table for links (url, etc...), and another table for linking user_ids with urls when a registered user (unique user_id) clicks on a link (unique link_id) this fact (row of information) can be entered into that 3rd table (user-link table with atributes user_id, link_id, click_time).

before inserting a row, simply issue a select query to check if that particular user_id, link_id combo exists in that table and if it does check to see the click_time ... do the diff between that time and the current time, and if it is greater than some x minutes etc ..... dont insert the new row.. instead put a message that "You have already clicked this link in the past 15 minutes ... bla bla".

the main thing is to click links automatically ... that can be done via the PHP cURL lib.
 
0
•••
Wow, I didn't even think of using the time part. Thanks alot.

But to do that, how would I log the time to do that? I don't think the date() function would work because that does just the date, right?
 
0
•••
PHP:
<?php echo date("g:i:s"); ?>

Hours:Minutes:Seconds
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back