I want a PHP function that identifies whether the Google+ API is ID of a Profile, Page or Community.
The Person resource that is returned by the people.get includes a "kind" field that specifies either "plus#person" or "plus#page." There currently is no official API support for Communities, though. You can see the full API specification at: https://developers.google.com/+/api/latest/people
For PHP, the people.get call looks like:
$me = $plus->people->get('me');
print "Kind: {$me['kind']}
";
This sample assumes a client object has been created. To learn more about creating a client, check out the starter: https://github.com/googleplus/gplus-quickstart-php