Beste,
weten jullie waarom mijn afbeeldingscode niet word weergegeven?
http://alturl.com/aq56z
hierbij het script van captcha.php
<?php
ob_start();
include("config.php");
class CaptchaSecurityImages {
var $font = 'fonts/monofont.ttf';
function generateCode($characters) {
$possible = '23456789bcdfghjkmnpqrstvwxyz';
$code = '';
$i = 0;
while ($i < $characters) {
$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);
$i++;
}
return $code;
}
function CaptchaSecurityImages($width='200',$height='40',$c haracters='6') {
$code = $this->generateCode($characters);
$font_size = $height * 0.75;
$image = @imagecreate($width, $height) or die('Cannot initialize new GD image stream');
$background_color = imagecolorallocate($image, 255, 255, 255);
$text_color = imagecolorallocate($image, 137, 136, 136);
$noise_color = imagecolorallocate($image, 166, 165, 165);
for( $i=0; $i<3; $i++ ) {
imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);
}
for( $i=0; $i<5; $i++ ) {
imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);
}
$textbox = imagettfbbox($font_size, 0, $this->font, $code) or die('Error in imagettfbbox function');
$x = ($width - $textbox[4])/2;
$y = ($height - $textbox[5])/2;
imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->font , $code) or die('Error in imagettftext function');
header('Content-Type: image/jpeg');
imagejpeg($image);
imagedestroy($image);
$_SESSION['imagecode'] = $code;
}
}
$width = isset($_GET['width']) ? $_GET['width'] : '200';
$height = isset($_GET['height']) ? $_GET['height'] : '40';
$characters = isset($_GET['characters']) && $_GET['characters'] > 1 ? $_GET['characters'] : '6';
$captcha = new CaptchaSecurityImages($width,$height,$characters);
ob_end_flush();
?>
- afbeeldingscode captcha word niet weergegeven?
-
14-03-2013, 17:46 #1
- Berichten
- 1.209
- Lid sinds
- 12 Jaar
afbeeldingscode captcha word niet weergegeven?
-
-
15-03-2013, 08:44 #2
- Berichten
- 94
- Lid sinds
- 17 Jaar
Re: afbeeldingscode captcha word niet weergegeven?
function CaptchaSecurityImages($width='200',$height='40',$c haracters='6') {
of is dit een typefout op het forum?
-
15-03-2013, 10:44 #3
- Berichten
- 1.209
- Lid sinds
- 12 Jaar
-
15-03-2013, 11:08 #4
- Berichten
- 41
- Lid sinds
- 12 Jaar
Re: afbeeldingscode captcha word niet weergegeven?
En jij maakt je zorgen om dat kleine foutje!?
Zou eens wat doen aan je beveiliging... nogal amateuristisch dit
Code:http://www.tweet-dating.com/config.php
Code:Warning: session_start() [function.session-start]: open(/domains/tweet-dating.com/public_html/temporary/sessions/######, O_RDWR) failed: No such file or directory (2) in /home/heinonq104/domains/tweet-dating.com/public_html/config.php on line 16 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/heinonq104/domains/tweet-dating.com/public_html/config.php:16) in /home/heinonq104/domains/tweet-dating.com/public_html/config.php on line 16 Warning: require_once(/domains/tweet-dating.com/public_html/smarty/libs/Smarty.class.php) [function.require-once]: failed to open stream: No such file or directory in /home/heinonq104/domains/tweet-dating.com/public_html/config.php on line 31 Fatal error: require_once() [function.require]: Failed opening required '/domains/tweet-dating.com/public_html/smarty/libs/Smarty.class.php' (include_path='.:/usr/local/lib/php') in /home/heinonq104/domains/tweet-dating.com/public_html/config.php on line 31 Warning: Unknown: open(/domains/tweet-dating.com/public_html/temporary/sessions/######, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/domains/tweet-dating.com/public_html/temporary/sessions) in Unknown on line 0
Code:http://www.tweet-dating.com/temporary/sessions/###
Laatst aangepast door fduisters : 15-03-2013 om 11:14
-
15-03-2013, 12:40 #5
- Berichten
- 1.209
- Lid sinds
- 12 Jaar
Re: afbeeldingscode captcha word niet weergegeven?
beste heb het es bekeken en blijkbaar staat characters toch goed. had dit gekopieerd/geplakt en blijkbaar is er iets misgegaan: function CaptchaSecurityImages($width='200',$height='40',$c haracters='6') {
mm, heel raar, terug word de ch hier gescheiden in bovenstaand bericht..
Laatst aangepast door moniaH : 15-03-2013 om 12:47 Reden: Automatisch samengevoegd.
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic