base64img.php base64-encodes images and generates PHP code that represents the image. This makes it possible to embed an image inside a PHP script. This enables you to create an entire Web site with images, using only a PHP script contained within a single file.