I was working on an Econometrics project and we needed to get a lot of data for a long list of tv shows. One good source was iMDB, but we didn’t feel like typing in the details of 1800 records… That’s when I had the idea of making a PHP scraper to get the info for us. I’ve polished it up and it’s easier to use now. The simplest example is:
// Perform a search and get info on 'inception'

// Output:

array(17) {
  string(9) "Inception"
  string(205) "In a world where technology exists to enter the human mind through dream invasion, a highly skilled thief is given a final chance at redemption which involves executing his toughest job to date: Inception."
  string(4) "2010"
  string(7) "148 min"
  string(0) ""
  string(17) "Christopher Nolan"
  string(0) ""
  array(15) {
    string(17) "Leonardo DiCaprio"
    string(20) "Joseph Gordon-Levitt"
    string(10) "Ellen Page"
    string(9) "Tom Hardy"
    string(12) "Ken Watanabe"
    string(10) "Dileep Rao"
    string(14) "Cillian Murphy"
    string(12) "Tom Berenger"
    string(16) "Marion Cotillard"
    string(18) "Pete Postlethwaite"
    string(13) "Michael Caine"
    string(10) "Lukas Haas"
    string(10) "Tai-Li Lee"
    string(12) "Claire Geare"
    string(12) "Magnus Nolan"
  array(3) {
    string(6) "Action"
    string(9) "Adventure"
    string(6) "Sci-Fi"
  string(927) "Dom Cobb is a skilled thief, the absolute best in the dangerous art of extraction, stealing valuable secrets from deep within the subconscious during the dream state, when the mind is at its most vulnerable. Cobb's rare ability has made him a coveted player in this treacherous new world of corporate espionage, but it has also made him an international fugitive and cost him everything he has ever loved. Now Cobb is being offered a chance at redemption. One last job could give him his life back but only if he can accomplish the impossible-inception. Instead of the perfect heist, Cobb and his team of specialists have to pull off the reverse: their task is not to steal an idea but to plant one. If they succeed, it could be the perfect crime. But no amount of careful planning or expertise can prepare the team for the dangerous enemy that seems to predict their every move. An enemy that only Cobb could have seen coming."
  string(3) "8.9"
  string(2) "10"
  string(7) "413,580"
  string(5) "2,095"
  string(3) "524"
  string(9) "tt1375666"
  string(36) "http://www.imdb.com/title/tt1375666/"
Some more examples:
// Import required files
require_once('csv.php'); // CSV helper functions


	/* Find full info using title, year is optional */
	var_dump( IMDbScraper::get('spongebob movie', '1999') );

	/* Find id and title of best search result, optional year */
	var_dump( IMDbScraper::find('spongebob movie', '1999') );
	var_dump( IMDbScraper::find('spongebob movie') );

	/* Return search results for title query, optional year */
	var_dump( IMDbScraper::search('spongebob') );
	var_dump( IMDbScraper::search('spongebob', '1999') );


	/* Write to CSV */
	var_dump( csv_write(IMDbScraper::search('spongebob'), 'example_files/example.csv') );
	/* Read from CSV */
	var_dump( csv_read('example_files/example.csv') );


	/* Scrape information from a saved IMDb search page, given as an HTML string */
	var_dump( IMDbScraper::scrape_search( file_get_contents('example_files/saved_search.html')) );

	/* Scrape information from a saved IMDb title page, given as an HTML string */
	var_dump( IMDbScraper::scrape_info( file_get_contents('example_files/saved_title.html')) );