A PECL php extension is available for gnupg.
for installation please check
http://www.php.net/manual/en/gnupg.installation.php
for list of functions, you can check:
http://www.php.net/manual/en/ref.gnupg.php
If you're looking for just encrypt and decrypt your data then you can use an open source PHP class as https://gist.github.com/niczak/2501891
To install any library on your web hosting then you need to first check your hosting because on shared hosting, mostly support doesn't allow you to install any third party libraries.
Thanks
Raheel