He,
Kent iemand het script theperfectbid?
voorbeeld:
http://www.crimemind.nl/tpb
zo ja kan die gene mij helpen met 2 dingen.
He,
Kent iemand het script theperfectbid?
voorbeeld:
http://www.crimemind.nl/tpb
zo ja kan die gene mij helpen met 2 dingen.
Dat is zoiets als budson en goudkoortsveiling?
Waarmee wil je geholpen worden?
Bij mij bij het registrerren zie je de captha niet.
Ondersteund je server GD Library? Kijk ff in je phpinfo. Of is het een third party, bijv. ReCaptcha?
en waar staat me phpinfo?
ik host op me eigen reseller namelijk
ik heb alleen gd status en gd version
En wat staat daarbij? Active/enabled?
GD Support enabled
GD Version bundled (2.0.34 compatible)
Dat kan het dan niet zijn. Is het een externe partij die de captcha verzorgd?
Bijvoorbeeld ReCaptcha, en of het een klein vak is. Inmiddels even in je bron gekeken. Wat staat er precies in CaptchaSecurityImages.php?
Theperfectbid is in nederland illegaal.
Pim en ik hebben ooit ook aan zo'n project gewerkt en toen had ik dit ook allemaal een beetje uitgezocht voor een klant.
<?php
session_start();
/*
* File: CaptchaSecurityImages.php
* Author: Simon Jarvis
* Copyright: 2006 Simon Jarvis
* Date: 03/08/06
* Link: http://www.white-hat-web-design.co.uk/articles/php-captcha.php
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details:
* http://www.gnu.org/licenses/gpl.html
*
*/
class CaptchaSecurityImages {
var $font = 'monofont.ttf';
function generateCode($characters) {
/* list all possible characters, similar looking characters and vowels have been removed */
$possible = '23456789bcdfghjkmnpqrstvwxyz';
$code = '';
$i = 0;
while ($i < $characters) {
$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);
$i++;
}
return $code;
}
function CaptchaSecurityImages($width='120',$height='40',$characters='6') {
$this->font = getcwd().'/'.$this->font;
$code = $this->generateCode($characters);
/* font size will be 75% of the image height */
$font_size = $height * 0.75;
$image = @imagecreate($width, $height) or die('Cannot Initialize new GD image stream');
/* set the colours */
$background_color = imagecolorallocate($image, 255, 255, 255);
$text_color = imagecolorallocate($image, 20, 40, 100);
$noise_color = imagecolorallocate($image, 100, 120, 180);
/* generate random dots in background */
for( $i=0; $i<($width*$height)/3; $i++ ) {
imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);
}
/* generate random lines in background */
for( $i=0; $i<($width*$height)/150; $i++ ) {
imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);
}
/* create textbox and add text */
$textbox = imagettfbbox($font_size, 0, $this->font, $code);
$x = ($width - $textbox[4])/2;
$y = ($height - $textbox[5])/2;
imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->font , $code);
/* output captcha image to browser */
imagejpeg($image);
imagedestroy($image);
$_SESSION['security_code'] = $code;
}
}
$width = isset($_GET['width']) ? $_GET['width'] : '120';
$height = isset($_GET['height']) ? $_GET['height'] : '40';
$characters = isset($_GET['characters']) ? $_GET['characters'] : '6';
header('Content-Type: image/jpeg');
$captcha = new CaptchaSecurityImages($width,$height,$characters);
?>
Toon Meer
http://www.crimemind.nl/tpb/Ca…50&height=100&character=6
Je krijgt een error. Haal de
header('Content-Type: image/jpeg');
weg en je ziet de PHP error.
de dat is die width en height enzo?
niels zei: haal dit weg : header('Content-Type: image/jpeg');
en dan krijg je dus een error van de PHP
ik ehb geen error dan maar ik krijg ook niks anders te zien.
Zeker dat je wel errors hebt.
Hier zijn ze:
Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /home/insane/domains/crimemind.nl/public_html/tpb/CaptchaSecurityImages.php on line 59
Warning: imagettftext() [function.imagettftext]: Could not find/open font in /home/insane/domains/crimemind.nl/public_html/tpb/CaptchaSecurityImages.php on line 62
Of terwijl, de opgegeven font bestaat niet (lettertype).
moet ik die font uploaden ofzo in me map?
en ik krijg die error niet xd
Heb je nog geen account? Registreer je nu en word deel van onze community!