Givemeamovie.com is one of my first projects that I completed in 2011. It was a weekend project I created to help cure my debilitating ailment called "I've already seen it" syndrome. Friends, family and spouse were all getting fed up by my endless queries for new movies to watch. With almost all answers being met with the response "I've already seen it", they were growing a bit weary. I decided to develop a system that can't complain.
The end goal was to have a site that would draw from a near endless supply of movies and display a random flick with a trailer ready to watch. There is room for integration with today's most popular movie streaming services and this is currently a feature being worked on in Givemeamovie.com v2.0.
The backend was created using the CodeIgniter framework. Everything from the core site functionality to the MovieDB data scrapers were built using the framework. To avoid the limitations of the public MovieDB API I decided to scrape the data into a local database so that I would not be pidgeonholed by exceeding public API request limits. A simple CRON job running a PHP script that would request 10 new movies every 3 minutes which allowed me to pull the entire database in just a few days without exceeding request limits. From here I had the freedom to scale the application without worry.
The only issue with running my own copy of the database was that I no longer had the benefit of open-source updates. Since most of the trailers were hosted on YouTube they were in a constant cycle of DMCA removals and embed limitations. To circumvent this, if a movie is randomly selected with a broken YouTube link it is flagged and removed from random selection. An alert is sent to myself and the movie is re-fetched from the MovieDB to check for updated trailers. If a suitable trailer replacement is found, the movie is automatically re-entered into the pool of eligible selections.
- CodeIgniter + PHP
- The MovieDB API