thedestroyer Posted July 9, 2009 Posted July 9, 2009 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"); ?> Quote
Dayo Posted July 9, 2009 Posted July 9, 2009 Re: Problem with my v2 Captcha it is the register.php you need to change === to == try doing it with cap sensitive Quote
thedestroyer Posted July 9, 2009 Author Posted July 9, 2009 Re: Problem with my v2 Captcha what u mean? i dont use captcha for register only for gym and crimes Quote
kotton1320 Posted July 9, 2009 Posted July 9, 2009 Re: Problem with my v2 Captcha Alot of games are having this problem. I seen it in tons of games i play mayby its a common bug ? Quote
thedestroyer Posted July 9, 2009 Author Posted July 9, 2009 Re: Problem with my v2 Captcha dam thats a real bummer cos now people can just use auto refresher :oops: Quote
Wickidnezz Posted July 10, 2009 Posted July 10, 2009 Re: Problem with my v2 Captcha unless you place a script that stops auto refreshers Quote
thedestroyer Posted July 10, 2009 Author Posted July 10, 2009 Re: Problem with my v2 Captcha how can i do that? do you have a code? Quote
thedestroyer Posted July 10, 2009 Author Posted July 10, 2009 Re: Problem with my v2 Captcha If anyone can make or already has this script please post. Thanks Quote
gurpreet Posted July 10, 2009 Posted July 10, 2009 Re: Problem with my v2 Captcha www.google.com There's your code! :roll: Quote
jon182 Posted July 10, 2009 Posted July 10, 2009 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 } Quote
thedestroyer Posted July 10, 2009 Author Posted July 10, 2009 Re: Problem with my v2 Captcha www.google.com There's your code! :roll: haha very funny Quote
CrazyT Posted July 11, 2009 Posted July 11, 2009 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 Quote
Dayo Posted July 11, 2009 Posted July 11, 2009 Re: Problem with my v2 Captcha make the answer into a session then check if the answer == the session Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.