In that case, php is not actually reading the numbers directly out of the image. The image is actually generated from the numbers themselves. You may want to google a phrase like "Turing" or something in reference to Turing Numbers.
You may also want to check out this link which has code for a turing number generator. (*Note, your PHP installation must support the GD Library functions for this to work.)
Also, if you attempt to use the code in that link I provided, you should direct your technical questions to that code's author first, since he's the one with the intimate knowledge of its inner workings. If he can't help, feel free to post back here for help.