php version of lms-notify