• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[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