Gesior acc kod weryfikacyjny

Status
Zamknięty.

Daniel13

Senior User
Zarejestrowany
Dołączył
Czerwiec 19, 2008
Posty
910
Liczba reakcji
32
Witam ;)

czy wie kto? jak zrobi? kod weryfikacyjny lecz ten stary ?

mam na serwerze kod weryfikacyjny lecz jest od do bani ;/ nieraz ci??ko wpisa? dobry kod ;/ bo s? tam te literki takie dziwne ...

I mam pytanie czy posiada kto? ten stary kod weryfikacyjny co trzeba wpisa? 4-5 liczb ? moim zdaniem by? on du?o lepszy ;)
 
Odp: Gesior acc kod weryfikacyjny

Posiadam taki skrypt:
imagebuilder.php
PHP:
<?PHP    
   session_start(); 
   $pool = '0123456789'; 
   $img_width = 80; 
   $img_height = 30; 
   $str = ''; 
   for ($i = 0; $i < 4; $i++){ 
       $str .= substr($pool, mt_rand(0, strlen($pool) -1), 1); 
   } 
   $string = $str;
   $im = imagecreate($img_width, $img_height); 
   $bg_color     = imagecolorallocate($im,103,103,103); 
   $font_color   = imagecolorallocate($im,252,252,252); 
   $grid_color   = imagecolorallocate($im,31,0,0); 
   $border_color = imagecolorallocate ($im, 174, 174, 174); 
   imagefill($im,1,1,$bg_color); 
   for($i=0; $i<500; $i++){ 
       $rand1 = rand(0,$img_width); 
       $rand2 = rand(0,$img_height); 
       imageline($im, $rand1, $rand2, $rand1, $rand2, $grid_color); 
   }
   $x = rand(5, $img_width/(7/2)); 
   imagerectangle($im, 0, 0, $img_width-1, $img_height-1, $border_color); 
   for($a=0; $a < 4; $a++){ 
       imagestring($im, 5, $x, rand(6 , $img_height/5), substr($string, $a, 1), $font_color); 
       $x += (5*2); #odst?p 
   }
   $_SESSION['string'] = $string; 
   header("Content-type: image/gif"); 
   imagegif($im); 
   imagedestroy($im); 
?>
Przyk?ad:
imagezd.png
 
Odp: Gesior acc kod weryfikacyjny

podmieniam ten skrypt w folderze " imgverification " i nic sie nie zmienia ;/
 
Odp: Gesior acc kod weryfikacyjny

podmieniam ten skrypt w folderze " imgverification " i nic sie nie zmienia ;/
Samo podmienienie ci nie pomo?e musisz jeszcze createaccount.php zmieni? pewn? linie, ale to zaraz ci si? postaram j? podes?a?.
1. Zmiana
Z tego:
PHP:
if($config['site']['verify_code'])
{	
require_once('recaptchalib.php');
$main_content .= '<script type="text/javascript">var verifya=1;</script><TR><TD width="150"><B>Code: </B></TD><TD colspan="2"><TR><TD width="150"><B>Code: </B></TD><TD colspan="2">'.recaptcha_get_html($config['site']['publickey']).'</TD></TR>';
}
Na to:
PHP:
if($config['site']['verify_code'])
{
	$main_content .= '<script type="text/javascript">var verifya=1;</script><TR><TD width="150"><B>Code: </B></TD><TD colspan="2"></TD><img src="imgverification/imagebuilder.php?image_refresher='.mt_rand(1,99999).'" border="0" alt=""><br><INPUT id="verify" NAME="reg_code" VALUE="" SIZE=30></TR>';
}
2. Zmiana
Z tego:
PHP:
if($config['site']['verify_code'])
	{
		//check verification code
require_once('recaptchalib.php');

$resp = recaptcha_check_answer ($config['site']['privkey'],
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {
  die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
       "(reCAPTCHA said: " . $resp->error . ")");

	} 
	}
Na to:
PHP:
if($config['site']['verify_code'])
{
	if(empty($reg_code))
		$reg_form_errors[] = "Please enter your email address.";
}
Powinno by? ju? wszystko cacy.
 
Ostatnia edycja:
Odp: Gesior acc kod weryfikacyjny

okey ;) mam nadziej?, ?e pomo?esz ;)

Daj edita czy pomog?o ;p
~Eturl
 
Ostatnio edytowane przez moderatora:
Odp: Gesior acc kod weryfikacyjny

dzia?a .

Lecz zamiast obrazek by? kolo code to jest nad account name :/

:

code.jpg
 
Ostatnia edycja:
Odp: Gesior acc kod weryfikacyjny

dzieki ziomus ! :)

rep polecial ;)


temat do zamkni?cia ;)
 
Status
Zamknięty.
Back
Do góry