Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
498 views
in Technique[技术] by (71.8m points)

PHP Captcha image not displaying in chrome

I use PHP for creating a captcha image. It is showing the captcha at the time of loading. After completing the loading, it doesn't show the captcha image in Chrome. In other browsers, it is working fine. Why?

<?php
// Create an image from button.png
$image = imagecreatefrompng('button.png');

// Set the font colour
$colour = imagecolorallocate($image, 255, 120, 4);

// Set the font
$font = '../fonts/Anorexia.ttf';

// Set a random integer for the rotation between -15 and 15 degrees
$rotate = rand(-15, 15);

// Create an image using our original image and adding the detail
imagettftext($image, 18, $rotate, 18, 30, $colour, $font, $str);

// Output the image as a png
imagepng($image);

?>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

having same problem.. One possible reason is anti-banner/ antivirus.. i am using Karpersky.. when i turned off kaspersky captcha showing ok, little bit strange from Chrome.. I think they should look for this problem


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...