|
Posted by Nu on 02/01/07 06:57
"Manish" <yehaimanish@gmail.com> wrote in message
news:1170310678.143555.270740@v33g2000cwv.googlegroups.com...
>
> $currentmin = mktime(date("H") , date("i"), 0, date("m"), date("d"),
> date("Y"));
>
> if(is_file($currentmin)) {
>
> /*
> get the content of the file
>
> if content of file > 10 (max limit per minute)
> display some message/redirect ...
>
> else
> increment the value of the content read from the file and write it
> back to the file
>
> process MySQL operations ...
>
> */
>
>
> } else {
> //create a file $currentmin
>
> //write the content "1" to the file
>
> }
>
>
> //you will need to delete the older $currentmin files by some scripts
That idea will work. Thanks.
Navigation:
[Reply to this message]
|