[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 12-18-2005, 07:01 AM   #1 (permalink)
NamePros Member
 
Join Date: Dec 2005
Posts: 186
0.00 NP$ (Donate)

chronic will become famous soon enoughchronic will become famous soon enough


[PHP] Clicking Script

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.
chronic is offline  
Old 12-18-2005, 07:10 AM   #2 (permalink)
sm
NamePros Regular
 
Join Date: Oct 2005
Location: India
Posts: 608
138.45 NP$ (Donate)

sm is just really nicesm is just really nicesm is just really nicesm is just really nice


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.
__________________
My blog (beta)

Bachelor.co.in - Gemstone.co.in
Assets.co.in - PropertyDealers.org
MortgageFirms.org - eLearner.org
sm is offline  
Old 12-18-2005, 07:28 AM   #3 (permalink)
NamePros Member
 
Join Date: Dec 2005
Posts: 186
0.00 NP$ (Donate)

chronic will become famous soon enoughchronic will become famous soon enough


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?
chronic is offline  
Old 12-18-2005, 11:51 AM   #4 (permalink)
NPQ's PA, Slave, and On Call Coder

Technical Services

 
Eric's Avatar
 
Join Date: Mar 2005
Posts: 4,545
0.71 NP$ (Donate)

Eric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond reputeEric has a reputation beyond repute

Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse
PHP Code:
<?php echo date("g:i:s"); ?>
Hours:Minutes:Seconds
__________________
Eric is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Great Scripts for Sale With Resale Rights! Zeeble Scripts For Sale 20 01-04-2006 01:39 AM
Huge Xmas script pack sale $5.00 KPR Scripts For Sale 1 12-08-2005 06:25 PM
Huge Script Pack for $5 with Resale Rights dsforsaken Scripts For Sale 32 12-03-2005 08:46 PM
60.000 Templates, scripts, fonts, banners etc. $9.95 atkims Web Development Wanted 19 11-16-2004 09:48 AM

Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 10:28 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85