
12.02.2010, 19:56
|
|
Постоянный
Регистрация: 05.01.2009
Сообщений: 684
С нами:
9130007
Репутация:
485
|
|
Вообщем хз куда запостить....возникла трабла......
Скрипт спокойно работает на денвере(пыха 5)
но не работает на серере(пыха 5.3)
просьба глянуть,и сказать,какие хрени этого кода удалены(заменены) в пыхе 5.3
PHP код:
$num1 = rand(100,2222);
$num=(string)$num1;
$im = @ImageCreate (70,20);
header ('Content-type: image/png');
$background_color = ImageColorAllocate ($im, 0xfc, 0xfc, 0xff);
$text_color = ImageColorAllocate ($im, 10, 10, 10);
$color1 = ImageColorAllocate ($im, 120, 15, 20);
for ($i=1; $i<6; $i++)
{
$idq = rand(1, 7);
imageellipse($im, 0, 0, 30*$idq, 15*$idq, $text_color);
}
for ($i=1; $i<100; $i++)
{
$x = rand(1, 90);
$y = rand(1, 19);
imageline($im, $x, $y, $x, $y, $color1);
}
for($i=0;$i<strlen($num);$i++)
{
ImageString($im, 5, 8+13*$i+rand(-2,2), 3+rand(-2,2),$num[$i], $text_color);
}
ImagePng ($im);
ImageDestroy($im);
if(isset($_REQUEST[session_name()])){
session_start();
}
if($_REQUEST[session_name()]){
$_SESSION['captcha_keystring'] = $num1;
}
|
|
|