Table of Contents
As of early 2015, the HammerFlicks application is no longer updated due to the end of Netflix's public API. For more information on the death of HammerFlicks, click here.
As of November, 2011 HammerFlicks script runs thrice a day, querying the Netflix API as to which Hammer Films are available for streaming. HammerFlicks checks for films (not shorts) listed in the Hammer Filmography on Wikipedia.
The previous name of the project was "HammerFlix" though this was changed to comply with the Netflix API branding requirements.
If you're interested in learning why this project exists, please read the original "HammerFlix" entry here.
You can download the source code for HammerFlicks here.
HammerFlicks sends each movie title from HammerFlicks_filmography.txt (derived from the Wikipedia filmography) to the Netflix API and requests only one result back per movie.
It assumes that if the production year for the returned result is within one year of the date listed in the filmography file that the result is most likely the Hammer Film in question. If the production year reported by Netflix doesn't match the +/- one year range, then it is assumed that Netflix doesn't carry the movie in either DVD or streaming formats – i.e. the returned result was for the closest match within the Netflix catalog, though for a completely different film.
Cross-reference links are also created by HammerFlicks given that many earlier Hammer Films were released under different titles (UK and US versions). As seen below, the filmography file contains a non-unique "movie_id" field which is used to associate a title with its corresponding alternate title. In the example below, "The Public Life of Henry the Ninth" has no alternate title, but "The Mystery of the Marie Celeste" and "The Phantom Ship" are notated as the same film as they both share the same movie_id. As such, HammerFlicks will create a cross-reference link between the two.
|The Public Life of Henry The Ninth||1935||The Public Life of Henry The Ninth 1935||1|
|The Mystery of the Marie Celeste||1935||The Mystery of the Marie Celeste / The Phantom Ship 1935||2|
|The Phantom Ship||1935||The Mystery of the Marie Celeste / The Phantom Ship 1935||2|
When HammerFlicks has determined whether or not the film likely lives on Netflix, it creates an HTML "snippet" inside the ./apiResults folder with any applicable cross-reference links. Applicable hyperlinks to the Netflix page for the film as well as the Watch Instantly link are also placed within the snippet.
The PHP similar_text function is used to assign a "match score" within each snippet if it believes Netflix carries the film. This helps determine the reliability of HammerFlicks given that occasionally an incorrect match is generated if the result returned was for a completely differently movie that happens to fall within the correct date range. Comparing the sent title with the one returned by Netflix helps address this issue.
Finally, the HammerFlicks.php file strings all the snippets together, allowing a user to traverse the list of Hammer Films and see which ones are on Netflix or not.
You can see HammerFlicks in the frame below or you can go directly to the page by clicking here. I recommend the latter otherwise if you click on a link the Netflix page will open in the frame below as well.
- I don't care for Hammer Films, but would like to do something similar for a list of other films. Can the source code be easily modified for this purpose?
- I don't see why not. You probably only need to edit the "HammerFlicks_filmography.txt" file to reflect the films you are interested in. Editing the CSS file and logo would also be necessary for aesthetic reasons though they have no effect on functionality. Of course, you'll need to register for your own API key.
- Note that HammerFlicks is only designed to support cross-referencing films with no more than one alternate title. This may or may not be an issue depending on the films you are interested in checking.