Forum Moderators: coopster
I have written a php script that enables users of our lan network to send sms messages to mobile phones.
Now i want to limit the sending of sms to 2 sms per day and per ip.
can anyone help to set this up?
i thought about a plain file solution as the number of clients in our lan is limited to about 50. but if you have an easy solution with database....
i need some help to get this started.
maybee u could give me some code snippets especially how to write and read out the db file.
i appreciate your ideas!
Maximilian
An easy way to do it might be to have a table that has all of the users in it with a date and total. Your sending script makes a quick check to see if the date is today. If not it updates the date to today and enters a 1 for the count. If the date is today it checks to see if the count is 2, if not it ups it to 2. If the date is today and the count is 2 it doesn't let them send.