View Full Version : check date and send auto email ?

07-04-2011, 09:27 AM
Hi friends,
i am new in php .... i want to create some function.... i want to send email to all my friend list on 1st day of the month...
my point is how i can get the the 1st day of every month ? plz any body help me in this matter i am realy thank full to you in advance...

Best Regard

07-04-2011, 10:25 AM
There are many ways to do this. Where is your friend's list stored?

Are you logging the notifications sent?
What type of server are you on?

07-05-2011, 09:13 AM
The script for the actual sending on the email will vary massively, but initiating the script is pretty simple.
On a windows server just use schedule tasks and for Linux use a cron job.

07-06-2011, 01:56 PM
Getting the first day of every month is easy:

$day = date('j');
if($day == 1){
// run script here