gpg = gnupg.GPG(gnupghome="/tmp/foldername", verbose=True) print "Import the Key :", gpg.import_keys(pub_key).summary()
this two lines of code gives me public key exract which i further used in encryption. i need to get the equivalent metods in php .