NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page little help here will pay if needed

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

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 08-09-2007, 11:27 PM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Feb 2005
Posts: 165
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, 02:20 AM   #2 (permalink)
NamePros Member
 
guillermobt's Avatar
Join Date: Sep 2005
Posts: 160
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 :-?
guillermobt is offline  
Old 08-10-2007, 06:06 AM   #3 (permalink)
Senior Member
 
netzilla's Avatar
Join Date: Aug 2005
Posts: 1,717
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, 07:46 AM   #4 (permalink)
I'll do it
 
-Nick-'s Avatar
Join Date: Dec 2005
Location: India
Posts: 6,927
-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness
 


Member of the Month
September 2007
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


Liquid Web Smart Servers  
All times are GMT -7. The time now is 04:52 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger