teemus (teemus) wrote in lj_nifty,
teemus
teemus
lj_nifty

  • Mood:
  • Music:

ljNotify: Get notifications by email of activity on your friends list...

I use Ryberg a lot, but needed something that would send email notifications when people add/remove me from their friends list. So I wrote this little script that runs once daily, off my server. It basically retrieves a user's friends list from LiveJournal, compares it to the day-old snapshot stored on my server (in text files), and sends an email to the user if any of the following activities has occured:

- the user has added more people to his friends list
- the user has removed people from his friends list
- the user has been added as a friend
- the user has been removed as a friend

You can take a look at the PHP source code of this script: http://sumeet.info/hacks/ljNotify.phps

To set this up on your server, create a subdirectory named "data" in the folder where you run ljNotify from, and change the permissions of that directory to 755 (writable by you).

You need to edit the source and make the following changes:
1) Line 16: Edit the array to accomodate the LJ users you wish to monitor, in the format 'lj_username' => 'email_id@domain_name.ext'.
2) Line 24: Edit the "From:" part in the email notifications, to the email ID setup on your server.

cheers,
Sumeet.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 16 comments