[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 08-09-2007, 10:27 PM   #1 (permalink)
NamePros Member
 
Join Date: Feb 2005
Posts: 159
31.00 NP$ (Donate)

alcapone is on a distinguished road


little help here will pay if needed

im wondering how i would make a php page only be allowed to be used twice


its a certain page in a rpg game that will wipe out all men it is a attack but i want to limit it to be used twice per round so i will need a calling to mysql for hitman that will noty allow it if they try to attack that player but they can still attack other players but limited to two times per player
__________________
Hostile-Territory
alcapone is offline  
Old 08-10-2007, 01:20 AM   #2 (permalink)
NamePros Member
 
Join Date: Sep 2005
Posts: 147
420.00 NP$ (Donate)

guillermobt is on a distinguished road


I don't know if I understood your problem, but it seems an easy thing to code.

When entering that page, just check the number of times that user entered it before and, if this number is >1 (i.e. == 2) you know he already accesed it two times for that date. Just show a warning and return :-?
__________________
technfo.com - pick.pk - ajaxpro.es - gbt.es - jamones.cn - sqzd.com - geoinfo.net

Free URL Redirection (for sale) (62,000+ subdomains and growing!!) Real IP / Proxy IP
guillermobt is offline  
Old 08-10-2007, 05:06 AM   #3 (permalink)
Senior Member
 
netzilla's Avatar
 
Join Date: Aug 2005
Location: Ohio
Posts: 1,704
223.80 NP$ (Donate)

netzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to behold


You will obviously need a way to keep count of how many hits the page has received and you could use either a flat file or a database table to store the data. Another option is to use php sessions and set this page hit count as a session variable.
netzilla is offline  
Old 08-13-2007, 06:46 AM   #4 (permalink)
I'll do it

Technical Services

 
-Nick-'s Avatar
 
Join Date: Dec 2005
Location: India
Posts: 6,434
5,169.80 NP$ (Donate)

-Nick- has a reputation beyond repute-Nick- has a reputation beyond repute-Nick- has a reputation beyond repute-Nick- has a reputation beyond repute-Nick- has a reputation beyond repute-Nick- has a reputation beyond repute-Nick- has a reputation beyond repute-Nick- has a reputation beyond repute-Nick- has a reputation beyond repute-Nick- has a reputation beyond repute-Nick- has a reputation beyond repute

Adoption
I have one more thing to add here. Just make sure that search engine bots don't get confused in this situation. Moreover if you make special privileges for search engine bots then it will be considered as cloaking. So please think of a way to show the page to users after they login or something and then over there you can track them according to their usernames or userid's

Thanks.
-Nick- 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


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 07:49 AM.


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