Source: https://freedomnode.com/blog/58/generate-bitcoin-wallet-addresses-from-extended-public-key-with-php