Posts Tagged shell
PHP, Email and Twitter – updated
Posted by Johnny in Design, PHP, Tech, TechMunchies on June 3, 2009
Update: The entire script is available at Snipt for your viewing pleasure.
Whenever we release a new Course at work an email is sent to all of the offices with all of the pertinent information including a link to the product page.
Looking for a way to keep people up-to-date on our releases through Twitter I decided the quickest, easiest and most hands-off way to do that would be to have a script that could take the email and extract the course name and a link to the product page and post it to twitter. This way we can keep people informed of the latest releases at the exact same time it’s being released.
So, I had three goals for this script.
1 – Grab the Subject and the product page link from the email.
2 – Shorten the product page link.
3 – Post the info to VTC’s twitter account
There’s nothing groundbreaking here. It’s basically reading a file with STDIN instead of a static file or webservice. But I thought I would share.







