Im trying to get the generated image from PHP via ajax.
Q.1 When ajax renders PHP it shows some symbols not the picture which it shows when PHP is run alone. How to i get the image PHP outputs and not those symbols?
Q2. How do i change the font size of the text rendered into the image?
PHP.
$im = imagecreate(300, 20);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagestring($im, 5, 15, 1, '564545446', $black);
header ('Content-type: image/png');
imagepng($im, null, 3);
Ajax:
$.CaptchaLoad = function(){
$.ajax({
type:"POST",
complete: function(){
},
url:"../php/captcha.php"
}).done(function(feedback){
$('.CaptchaImg').html(feedback)
});
}