A simple Twitter Scraper
It’s about time I release some of the code I’ve been writing. Today, a simple twitter scraper in PHP, a simplified version of the one we (DMI) used for our #iranelection project. Just copy-paste the code below into a file called twitterScraper.php and follow the directions in the comments.
Of course, this is not the official way to scrape Twitter. The nice thing about this script however, is that you can retrieve all public tweets up till two weeks ago; by continuing to pass the latest id of a result page as the max_id parameter. This script circumvents Twitter’s API limits on maximum number of requests as well as the maximum number of results returned. Of course, usage of this script and the possible consequences are your own responsibility.




