Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/05/2005, 11:21
masterofpuppets
 
Fecha de Ingreso: febrero-2004
Ubicación: bahia blanca
Mensajes: 280
Antigüedad: 20 años, 3 meses
Puntos: 0
si, pero no se por que estaria mal....ya lo he subido de nuevo y el error sigue asi
Código:
<?php
//=================================================================\\
// Aardvark Topsites PHP 4.2.2                                     \\
//-----------------------------------------------------------------\\
// Copyright 2003-2005 Jeremy Scheff - http://www.aardvarkind.com/ \\
//-----------------------------------------------------------------\\
// 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.                    \\
//=================================================================\\

error_reporting(E_ERROR | E_WARNING | E_PARSE);
set_magic_quotes_runtime(0);

require_once 'config.php';

require_once $CONFIG['path'].'/sources/drivers/'.$CONFIG['sql'].'.php';
$db = new SQL;
$db->Connect($CONFIG['sql_host'], $CONFIG['sql_user'], $CONFIG['sql_pass'], $CONFIG['sql_database']);

require_once $CONFIG['path'].'/sources/session.php';

$image = imagecreate(140, 30);

$white = imagecolorallocate($image, 255, 255, 255);
$gray = imagecolorallocate($image, 192, 192, 192);
$black = imagecolorallocate($image, 0, 0, 0);

$string = mt_rand();
$string = substr(sha1($string), 0, 6);
$string = str_replace(array('0', 'O', 'o'), rand(1, 9), $string);

for ($i=0; $i<25; $i++) {
  $x1 = rand(0,140);
  $y1 = rand(0,30);
  $x2 = rand(0,140);
  $y2 = rand(0,30);
  imageline($image, $x1, $y1, $x2, $y2 , $gray);  
}

for ($i=0; $i<6; $i++) {
 $size = rand(3, 5);
 $x = $x + rand(12 , 20);
 $y = rand(7 , 12); 
 imagestring($image, $size, $x, $y, $string{$i} , $black); 
}

$ip = getenv("REMOTE_ADDR");
$db->Execute("DELETE FROM ".$CONFIG['sql_prefix']."_sessions WHERE data LIKE '{$ip}|%'");
$session_string = $ip.'|'.sha1($string);
$session = new Session;
$TMPL['session_id'] = $session->GetID(24);
$session->SetType('captcha');
$session->SetData($session_string);
$session->Create(1);

header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?>