<?php $str = base64_encode(file_get_contents("captcha.png")); echo "<img src=\"data:image/png;base64, $str\" alt=\"image\"/>"; ?>