nice implementation of gammu
http://matt.bottrell.com.au/archives/205-Nagios-2-way-alerting-via-SMS-Part-2.html
nice implementation of gammu
http://matt.bottrell.com.au/archives/205-Nagios-2-way-alerting-via-SMS-Part-2.html
proven, converts mail to sms format: http://daniel.haxx.se/projects/mail2sms/readme.shtml
I use these to do mail-to-db: http://download.gna.org/hpr/fetchmail/FAQ/gmail-pop-howto.html AND http://www.evolt.org/incoming_mail_and_php AND http://userpages.umbc.edu/~ian/procmail.html
perl read STDIN: while () { print $_; }
php read STDIN
$fp = fopen(‘php://stdin’, ‘r’); while($line = fgets($fp, 4096)) { echo $line; };
the other half (cron-ed php script)
mysql_query(‘SELECT * FROM kerja ORDER by id ASC LIMIT 1′)
$ret=system(‘/usr/bin/uptime’);
$ret=trim($ret);
half of the actual trigger
DELIMITER $$
CREATE TRIGGER kerjakan AFTER INSERT ON inbox FOR EACH ROW BEGIN
insert into kerja(cmd_id) values(NEW.TextDecoded);
END $$
DELIMITER ;
bayu 12:11 am on December 16, 2009 Permalink
create trigger kerjakan AFTER INSERT ON inbox FOR each row begin insert into kerja(command,sender) values (NEW.TextDecoded,NEW.SenderNumber); END$$