Sample PHP script that shows how to query the FreeBase API for Person data. Additionally, it traverses the FreeBase API Result extracting important details. This script also allows you to see the entire JSON result.
- Live Demo: http://royrusso.com/freebase-php/
- Apache WS or IIS
- PHP 5.3+
- PHP-Curl lib enabled
- You will need a valid Google Developer API key. Get one here: https://developers.google.com/apis-explorer/
- Copy the contents of the 'freebase' directory to your web server.
- Browse to http://yourserver/freebase.
- The Freebase API documentation can be found here: https://developers.google.com/freebase/
I originally wrote a version of this script to extract Author data for my site, http://www.worldofquotes.com. You can see it presented here for reference: http://www.worldofquotes.com/author/Mahatma+Gandhi/1/index.html
See included LICENSE.md file.