Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] [Mod] Captcha At Reg

Status
Not open for further replies.
Junior Spellweaver
Joined
Sep 14, 2005
Messages
119
Reaction score
15
This is for my ogame share

open reg.php

search for
Code:
	if(!is_email($_POST['email'])){
	$errorlist .= "\"".$_POST['email']."\" ".$lang['error_mail'];
	$errors++;
	}


put after
Code:
	session_start(); 
	$girilen = $_REQUEST["captcha"];
	if($_SESSION['captcha'] == $girilen){
	echo "";
	}else{
	$errorlist .= $lang['error_captcha'];
	$errors++;	
	}
save and close

Make new php file called captcha.php to root directory
Code:
<?php // Captcha by DeimosX
session_start();
$en=100;
$boy=25;
$sayi = mt_rand(0,9999999);
$_SESSION['captcha'] = $sayi;
$tuval = imagecreatetruecolor($en,$boy);
$b = imagecolorallocate($tuval,175,238,238);
$s = imagecolorallocate($tuval,0,0,0);
imagefill($tuval,0,0,$s);
imageline($tuval,20,50,$en,$boy,$b);
imagestring($tuval,3,27,7,$sayi,$b);
Header("content-type:image/gif");
imagegif($tuval);
imagedestroy($tuval);
?>
save and close

open templates/opengame/registryform.tpl
put this anywhere
Code:
<tr>
      <td>Security image</td>
	<td><img src="captcha.php"></td>
</tr>
     <tr><td>Code</td>
<td><br><input type="text" name="captcha" size="20" maxlength="20" /></td>
     </tr>
save and close

open language/yourlang/reg.mo
put anywhere you want
Code:
$lang['error_captcha'] = 'Wrong Security Code<br />';
 
Newbie Spellweaver
Joined
Nov 11, 2008
Messages
5
Reaction score
0
I have error!

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\xampp\htdocs\Ogame\common.php:214) in D:\xampp\htdocs\Ogame\reg.php on line 75
 
Junior Spellweaver
Joined
Sep 14, 2005
Messages
119
Reaction score
15
Warning!
This is insecure.its just visual only found bugs and i didnt fixed it
 
Initiate Mage
Joined
Feb 4, 2009
Messages
1
Reaction score
0
Warning!
This is insecure.its just visual only found bugs and i didnt fixed it


noob warez bastard !

duck your all family

duck all kurd

duck all pkk members !

you are bastard all time !

vatan haini orospu cocugu

ANANİ BACİNİ SAT , PKK YA BOMBA AL SULALENİ SATSAN DA DAMARİNDA TURK KANİ OLAMAZ !

GOTUNE KOYAYİM SENİN LAVUK
 
Status
Not open for further replies.
Back
Top