Autor Zpráva
JeremyCB
Profil
Na lokalu mi to krasne funguje a kdyz to povesim na webzdarma nebo na xhosring tak to nefaka, proc??


<?php
session_start();

for ($i=0; $i<6; $i++)
{
while(strlen($str[$i]) != 1)
{
$random=rand(48,123);
if(($random > 47 && $random < 58) || ($random > 96 && $random < 123) || ($random > 64 && $random < 91))
{
$str[$i] = chr($random);
}
}
$text .= $str[$i];
}

$obrazek = imagecreatefrompng("../images/p_kod.png");
for($i=0; $i<6; $i++)
{
$textcolor = imagecolorallocate($obrazek, rand(0,130), rand(0,130), rand(0,130));
$pismenko = substr($text, 0+$i ,1);
if($i*rand(0, 1) % 2)
{
imagettftext($obrazek, rand(12,25), rand(-45,45), 10+($i*30), 30, $textcolor, "../fonts/verdana.ttf", $pismenko);
}
else
{
imagettftext($obrazek, rand(12,25), rand(-45,45), 10+($i*30), 30, $textcolor, "../fonts/times.ttf", $pismenko);
}
}
$_SESSION['string'] = $text;
header("Cache-Control: no-cache");
header("Content-type: image/png");
imagepng($obrazek);
imagedestroy($obrazek);
exit();
?>
WertriK
Profil *
Co to pise za chybu ? jestli to neco pise ...
Peca
Profil
Nevím, jak se to přesně jmenuje, ale na WZ jsou ty operace s obrázky zakázané. Je to výpočetně náročné.
JeremyCB
Profil
prave ze to nezobrazi nic ani to nic nenapise kdyz dam ve FF zobrazit obrazek tak to napise :
Obrázek “http://xxxx.cz/antibot.php” nelze zobrazit, protože obsahuje chyby.
Anonymní
Profil *
http://www.webzdarma.cz/forum/read.php?f=2&i=29360&t=29360
Toto téma je uzamčeno. Odpověď nelze zaslat.

0