Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
<?php $username = "e_d_s_a_t_a"; $feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&rpp=1"; function parse_feed($feed) { $stepOne = explode("<content type=\"html\">", $feed); $stepTwo = explode("</content>", $stepOne[1]); $tweet = $stepTwo[0]; $tweet = htmlspecialchars_decode($tweet,ENT_QUOTES); return $tweet; } $twitterFeed = file_get_contents($feed); echo('"'.parse_feed($twitterFeed).'"'); ?>
This paste will be private.
From the Design Piracy series on my blog: