View file autoload/captcha.php
<?php function captcha() { ?> <script> function captcha_reload() { document.getElementById('captcha').src = "/utils/captcha.php?" + Math.random(); } </script> <?php echo '<img id="captcha" src="'. URL .'/utils/captcha.php" alt="captcha" /><br /> <a href="javascript:captcha_reload();">Обновить картинку</a><br />'; } ?>