Chris Grigor wrote: > Right now your in the picture this is okay to check if the mailbox is above > the size of 0. But what I really need help with is, say for instance I get 1 > message into the mailbox and the script runs, I only want it to run once for > that message, however if another message comes in I need it to notify me... > at the moment it runs every 10 mins and just keeps notifying me over & over.
you have to keep state before exiting the script in a filke or a database and then look up that state in the next run. say you save something like path size ---- ---- /path/to/mailbox/hugo 15kb /path/to/mailbox/mary 56kb then you only send a message when the size of the mailbox changes again, not when number of files in it is more than 1 mabye you need to use things like modification time instead of size, i don't know right now which is better. You should _not_ use numbr of files, as when ypu save the state "1 file in mailbox" it could be that the user fetched on file menawhile and another file has come in - your program doesn't register a change but it has changed very well... HTH, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]