This project shows how to use the nameapi-client-php from https://github.com/optimaize/nameapi-client-php with Composer the PHP dependency manager from https://getcomposer.org/.
Integration using Composer is the recommended way. If you're already using it, then just add this to your composer.json file in the "require" section:
"optimaize/nameapi-client-php": "dev-master"
If you don't know Composer yet, head over to https://getcomposer.org/ it explains everything.