Current location: Hot Scripts Forums » Programming Languages » PHP » limit the amount of times a user can visit a page


limit the amount of times a user can visit a page

Reply
  #1 (permalink)  
Old 01-03-07, 05:57 AM
txt3rob txt3rob is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
limit the amount of times a user can visit a page

is there any way i can stop a user requesting a page a set number of times?
i.e once their i.p has visited the page 5 times it then stops them for 24 hours from seeing that page?
__________________
N00b Coder! One of those guys who collects bits of code and puts them together and carnt really code for himself
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-03-07, 07:59 AM
streety streety is offline
Newbie Coder
 
Join Date: Nov 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
You can track by ip address or use cookies but ip addresses can change and cookies can be deleted.

You could set up a system that worked fairly well but it wouldn't be absolute.
__________________
Web Development Blog - Useful bits & pieces
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 01-03-07, 08:32 AM
txt3rob txt3rob is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
just something basic like cookies would do if you know of anything please let me know
__________________
N00b Coder! One of those guys who collects bits of code and puts them together and carnt really code for himself
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 01-03-07, 07:57 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by txt3rob
is there any way i can stop a user requesting a page a set number of times?
i.e once their i.p has visited the page 5 times it then stops them for 24 hours from seeing that page?
Well, you could make it so they have to login to see it, but if that's not an option then go with cookies as some of the other people have suggested. It's not bulletproof but it'll help. Combining that with the IP will help more, but beyond that it gets tricky (and hence the login suggestion).
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


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

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help! Display Records page by page peter_toronto PHP 5 02-20-08 10:12 AM
limit words per page... Soulidified PHP 0 11-26-04 08:37 PM
Paginating problem,extra empty page morrowind PHP 2 05-03-04 04:32 AM
page browsing problem mivec PHP 3 04-17-04 04:43 AM
Need Epinions-lite system in PHP & MYSQL wali001 Job Offers & Assistance 4 01-12-04 07:02 AM


All times are GMT -5. The time now is 12:35 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.