Use jquery + php. Doing Customs AJAXcaptcha. i. 用户点击图像,自动更新。
<script src="/js/jquery.js"></script>
<script>
$(document).ready(function(){
$.post( /captcha.php , {}, function(resp){
$("div").html(resp);
});
});
</script>
<div></div>
in PHP header already sent, so if it includes into <img src="/captcha.php" />
it prints captcha in jpeg. The problem seem to be is header that need to be sent. So, how can i do this? The header is sent in PHP. It doesnt work in js.