This is a PHP implementation of Mojang's AccountsClient for Minecraft. It uses Mojangs public API to convert player names -> UUID and UUIDs -> player names.
A big thanks to the guys at the AccountsClient wiki, who created this wonderful documentation. I would have had a hard time without their documentation.
Examples can be found in example.php.