Jump to content
MakeWebGames

Recommended Posts

Posted

Hi, when i type in the number it shows for my captcha it says it is wrong or i left it blank even though i type the right nummber can anyone help me please? heres the macro's

macro1.php

 

<?php
include "globals.php";
if(!$set['validate_on'] || $ir['verified'])
{
die("WTF are you doing on this page? Go home loser.");
}
$ref=$_GET['refer'];
unset($_SESSION['captcha']);
$chars="0123456789";
 $len=strlen($chars);
 $_SESSION['captcha']="";
 for($i=0;$i<1;$i++)
 $_SESSION['captcha'].=$chars[rand(0, $len - 1)];
print "<h3>Validation</h3><hr />
Enter the text you see in the image into the box below.<form action='macro2.php' method='post'>";
if($_GET['code'])
{
print "<font color='red'>[b]Invalid code or blank[/b]</font>
";
}
print "
[img=captcha_verify.php]

Text: <input type='text' name='captcha' />

<input type='hidden' name='refer' value='{$_GET['refer']}' />
<input type='submit' value='Verify' /></form>";
$h->endpage();
?>

 

and here's the macro2.php

 

<?php
session_start();
if(get_magic_quotes_gpc() == 0)
{
die("Fatal error: MCCode cannot function without MagicQuotes GPC being turned on in PHP.INI.");
}
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
include "config.php";
global $_CONFIG;
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
$db=new database;
$db->configure($_CONFIG['hostname'],
$_CONFIG['username'],
$_CONFIG['password'],
$_CONFIG['database'],
$_CONFIG['persistent']);
$db->connect();
$c=$db->connection_id;
$is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid");
$ir=$db->fetch_row($is);
$set=array();
$settq=$db->query("SELECT * FROM settings");
while($r=$db->fetch_row($settq))
{
$set[$r['conf_name']]=$r['conf_value'];
}
if(!$set['validate_on'] || $ir['verified'])
{
die("WTF are you doing on this page? Go home losr.");
}
if(!isset($_SESSION['captcha']))
{
header("Location: macro1.php?code=invalid&refer={$_POST['refer']}");
exit;
}
if($_SESSION['captcha'] != $_POST['captcha'])
{
header("Location: macro1.php?code=invalid&refer={$_POST['refer']}");
exit;
}
$ref=$_POST['refer'];
unset($_SESSION['captcha']);
$db->query("UPDATE users SET verified=1 WHERE userid={$userid}");
header("Location: $ref");
?>
Posted

Re: Problem with my v2 Captcha

you could make your own captcha just go like this

$var1=rand(1,9);

$var2=rand(1,9);

print " Captcha test $var1+$var2";

then create a form with a text box for the answer and do

if ($_POST['answer']!=$var1+$var2)

die ("You failed the captcha test")

else

{

your script

}

Posted

Re: Problem with my v2 Captcha

 

you could make your own captcha just go like this

$var1=rand(1,9);

$var2=rand(1,9);

print " Captcha test $var1+$var2";

then create a form with a text box for the answer and do

if ($_POST['answer']!=$var1+$var2)

die ("You failed the captcha test")

else

{

your script

}

Lmfao.. That wont work at all. once you open register, it will rand 1 to 9 on both then when u click submit it will change. lol i dont think you know what your on about tbh. lol

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...