Results 1 to 4 of 4

Thread: Have You Forgotten Us?

  1. #1
    Join Date
    Jul 2011
    Posts
    56
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default Have You Forgotten Us?

    I've been trying to create a PHP script that sends an email to a user who hasn't visited our site in a while. How can I do this?

    Thanks!
    Last edited by M2com; 08-15-2011 at 12:33 AM.

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    do you currently log when users visit?

    your flow might look like:

    --check db for users with "last_visit" more than {whatever interval you choose} ago
    --use mail() to send reminder

    you could possibly make this a cron job, so it would run automatically at a set interval.

    honestly, though, I would recommend against this.
    People who don't visit your website anymore won't be happy to get annoying reminders about it.
    for example, I'm getting mighty p*ssed at linkedin right now.

  3. #3
    Join Date
    Jul 2011
    Posts
    56
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default

    LOL!

    What would be an example of "last_visit" and "more than {whatever interval you choose} ago"? Sorry but I'm a little new in this area of PHP.

    Thanks!

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    well, that's directly related to if you already keep a record of when users visit your site (presumably in a database). Do you currently do this?

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
  •