Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
ip-check - max one upload pr. month !
Old 08-28-2006, 01:15 PM ip-check - max one upload pr. month !
tomcat_fo's Avatar
Ultra Talker

Posts: 275
Trades: 0
I have this thing on my website where i want to limit user upload to MAX one upload in a month.

I have the following attributs, in my IP-check table:
id, ip, date

I belive that shuld be all i need... i don't create users on my website, so no user table is needed.

First tought i could make a 30 day counter thing.... but i think that would anoy my visitors, because if they upload in the middle of one month they could not upload again before the middle of the next month, and the rules are just "one upload pr. month".... so they should be able to upload EG. in the end of one month and then in the beginning of the next. - BUT still only one upload pr month


Hope someone know as good soulution for this

Last edited by tomcat_fo; 08-28-2006 at 01:16 PM..
tomcat_fo is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-28-2006, 02:35 PM Re: ip-check - max one upload pr. month !
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
what about dynamic IPs???
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-28-2006, 02:55 PM Re: ip-check - max one upload pr. month !
tomcat_fo's Avatar
Ultra Talker

Posts: 275
Trades: 0
Well, my users will be from the Faroe Islands and here most people have static IP.

The once that have dynamic ip, i just need to control by name or something....

By the way, i don't think there is any way to be 100% sure that there will be only one upload a month pr. users, no matter how you do it.
tomcat_fo is offline
Reply With Quote
View Public Profile
 
Old 08-29-2006, 11:04 AM Re: ip-check - max one upload pr. month !
tomcat_fo's Avatar
Ultra Talker

Posts: 275
Trades: 0
so.... has anyone an answer for this one ?
tomcat_fo is offline
Reply With Quote
View Public Profile
 
Old 08-29-2006, 11:26 AM Re: ip-check - max one upload pr. month !
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
By depending on IP, there is a real chance that your method could be exploited because of dynamic IP's and ppl using IP gateways (I think that is what it is called).

To ensure a true method of limiting, you would require a login system in which a user would have to login before they could upload, and have the db record the datetime of the upload.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 08-29-2006, 12:10 PM Re: ip-check - max one upload pr. month !
tomcat_fo's Avatar
Ultra Talker

Posts: 275
Trades: 0
People could then just create several users.... so the problem would be pretty much the same..... - the only difference is that it takes time to create a user.



Just hope someone can answer the question, because i'm going to need someting simular in another php file as well.
tomcat_fo is offline
Reply With Quote
View Public Profile
 
Old 08-29-2006, 12:46 PM Re: ip-check - max one upload pr. month !
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It's a little difficult to come up with a definitive answer when you keep deciding each one has drawbacks as all solutions will have

do everything possible, check ips, use membership limits and set cookies.

All these can be defeated by some means or another, but Hey! Welcome to the Internet
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-29-2006, 02:11 PM Re: ip-check - max one upload pr. month !
tomcat_fo's Avatar
Ultra Talker

Posts: 275
Trades: 0
I only wanted to make an MySQL & PHP check if something has been posted within a specific month.... E.G. August...... but it needs to work in other months as well.

As i said in my first post i'v considerd a 30day counter thing... but then people would need to wait 30days to post next time, and that would anoy a few people if they posted in the end of august, and a new month is just arround the corner.

So is it possible to chek on ONLY current month and year, and forget about day in the month ? - the datebase DATE looks like this 2006-08-22 ..... is it possible to ONLY check current date on the month number and year number ?
tomcat_fo is offline
Reply With Quote
View Public Profile
 
Old 08-29-2006, 09:14 PM Re: ip-check - max one upload pr. month !
Extreme Talker

Posts: 246
Trades: 3
If you stored the date of the download in your table, you could get the most recent download date for that IP, and do the following comparison to check if they have downloaded something this month:

if (date("Ym", $row["downloadDate"] == date("Ym")) {

...

}
CouponGuy is offline
Reply With Quote
View Public Profile
 
Old 08-29-2006, 09:14 PM Re: ip-check - max one upload pr. month !
Extreme Talker

Posts: 246
Trades: 3
naturally, you would want to close all the parentheses in the correct places.
CouponGuy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to ip-check - max one upload pr. month !
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30610 seconds with 12 queries