Results 1 to 4 of 4

Thread: check date and send auto email ?

  1. #1
    Join Date
    Oct 2009
    Location
    Sialkot
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question check date and send auto email ?

    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

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    There are many ways to do this. Where is your friend's list stored?

    1. Are you logging the notifications sent?
    2. What type of server are you on?
    Corrections to my coding/thoughts welcome.

  3. #3
    Join Date
    May 2011
    Posts
    16
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    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.

  4. #4
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Getting the first day of every month is easy:

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

    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •