stop flooding in registration on wapdesire v2?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • brand
    replied
    has any one got this for the wapdesire v_2 that was made by ori please as i am also having the same problem

    Leave a comment:


  • subzero
    replied
    Have you ever think the session_start() mite be your error ??

    For 1 don't add this to your index of sign up page leave it to the image it self

    Or inbox me your site url so i can see what is wrong.

    Leave a comment:


  • honkytonkman
    replied
    Originally posted by subzero View Post
    This is why i coded my own script you know it will work
    sure..but for some reason don't works on mine.
    however ,thanks for help..

    Leave a comment:


  • subzero
    replied
    This is why i coded my own script you know it will work

    Leave a comment:


  • honkytonkman
    replied
    believe it or not..result is:
    The number you entered doesn't match the image

    ain't no way ...

    Leave a comment:


  • subzero
    replied
    Image file image.php
    Code:
    <?php 
    ini_set('display_errors','0');
    session_start();
    $font = 'font/georgia.ttf'; 
    $lineCount = 3; 
    $fontSize = 13; 
    $height = 50; 
    $width =  50; 
    $img_handle = imagecreate ($width, $height) or die ("Cannot Create image"); 
    $backColor = imagecolorallocate($img_handle, 0,0,0); 
    $lineColor = imagecolorallocate($img_handle, 255,0,0); 
    $txtColor = imagecolorallocate($img_handle, 255,255,255); 
    $string = "abcdefghijklmnopqrstuvwxyz0123456789"; 
    for($i=0;$i<4;$i++){ 
        $pos = rand(0,36); 
        $str .= $string{$pos}; 
    } 
    $textbox = imagettfbbox($fontSize, 0, $font, $str) or die('Error in imagettfbbox function'); 
    $x = ($width - $textbox[4])/2; 
    $y = ($height - $textbox[5])/2; 
    imagettftext($img_handle, $fontSize, 0, $x, $y, $txtColor, $font , $str) or die('Error in imagettftext function'); 
    for($i=0;$i<$lineCount;$i++){ 
        $x1 = rand(0,$width);$x2 = rand(0,$width); 
        $y1 = rand(0,$width);$y2 = rand(0,$width); 
        imageline($img_handle,$x1,$y1,$x2,$y2,$lineColor); 
    } 
    header('Content-Type: image/jpeg'); 
    imagejpeg($img_handle,NULL,100); 
    imagedestroy($img_handle); 
    $_SESSION['img_number'] = $str; 
    ?>
    Place this in sign up
    Code:
    echo "<div>Captcha:</div>";
    echo "<div style=\"text-align:center\"><img src=\"images/image.php\" alt=\"NO PASS\"/></div>";
    echo "<div><input type=\"text\" name=\"num\" id=\"ssl\" size=\"4\"/></div>";

    Place this in core or what ever you pick
    Code:
    if($_POST[num] == "")
    {
    echo "<div>The number you entered doesn't match the image.</div>"; 
    
    
    
    echo "</body></html>";
    exit;
    }
    if($_SESSION['img_number'] != $_POST['num'])
    { 
    
    
        echo "<div>The number you entered doesn't match the image.</div>"; 
        
    
    
    }else{
    
    Hey sign up now enjoy!!
    
    }
    Remember to download your font georgia.ttf

    then place it in folder font in images

    Leave a comment:


  • honkytonkman
    replied
    Originally posted by hidden
    try this may work
    Code:
    <?php
    //session_start();
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    //header('Content-type: application/vnd.wap.xhtml+xml'); 
    echo "<?xml version=\"1.0\"?>";
    echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <?php
    $uid = $_POST["uid"];
    $pwd = $_POST["pwd"];
    $cpw = $_POST["cpw"];
    $email = $_POST["email"];
    include ("config.php");
    include ("core.php");
    connectdb();
    $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
    $sitename = $sitename[0];
    $brws = explode("/",$HTTP_USER_AGENT);
    $ubr = $brws[0];
    echo "<head>";
    echo "<title>$sitename</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
    echo "</head>";
    echo "<body>";
    $ipr = getip();
    $uip = explode(".",$ipr);
    
    if((!canreg())||(isipbanned($ipr,$ubr)))
    {
        echo "<p>";
        echo "<img src=\"../images/notok.gif\" border=\"0\" alt=\"X\"/>Registration is closed at the moment";
        echo "</p>";
    }else{
    echo "<p>";
    ?>
    <img src="http://coding-talk.com/images/point.gif" alt="!"/>
    Allowed characters in userid and password are a-z, 0-9, and -_ only<br/>
    <img src="http://coding-talk.com/images/point.gif" alt="!"/>
    No vulgar words are accepted in Username<br/>
    <img src="http://coding-talk.com/images/point.gif" alt="!"/>
    Username and Password must contain at least 4 characters<br/>
    <img src="http://coding-talk.com/images/point.gif" alt="!"/>
    Username must begin with a letter and cannot contain capitals<br/>
    <img src="http://coding-talk.com/images/point.gif" alt="!"/>
    Password will be case sensitive<br/>
    <?php
    $tolog = false;
    if(trim($uid)=="")
    {
        echo registerform(1);
    }elseif ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='')
    {
        echo registerform(15);
    }else if(trim($pwd)=="")
    {
        echo registerform(2);
    }else if(trim($cpw)=="")
    {
        echo registerform(3);
    }else if(spacesin($uid)||scharin($uid))
    {
        echo registerform(4);
    }else if(spacesin($pwd)||scharin($pwd))
    {
        echo registerform(5);
    }else if($pwd!=$cpw)
    {
        echo registerform(6);
    }else if(strlen($uid)<4)
    {
        echo registerform(7);
    }else if(strlen($pwd)<4)
    {
        echo registerform(8);
    }else if(isdigitf($uid))
    {
        echo registerform(11);
    }else if(checknick($uid)==1)
    {
        echo registerform(12);
    
    }else if(checknick($uid)==2)
    {
        echo registerform(13);
    
    }else if(trim($email)=="")
    {
        echo registerform(14);
    
    }else if(register($uid,$pwd,$usx,$day,$month,$year,$ulc,$email,$info, $ubr)==1)
    {
        echo registerform(9);
    }else if(register($uid,$pwd,$usx,$day,$month,$year,$ulc,$email,$info, $ubr)==2)
    {
        echo registerform(10);
    }else{
    //$brws = explode(" ",$HTTP_USER_AGENT);
        //$ubr = $brws[0];
        //$fp = fopen("gallery/info.txt","a+");
        //fwrite ($fp, "\n".$uid."-".$pwd."-".$ipr."-".$ubr."\n");
        //fclose($fp);
    
      echo "Registration completed successfully!<br/>";
    Originally posted by hidden
    Code:
        [B]
      echo "<br/><b>Username: </b>$uid<br/>";
      echo "<b>Password: </b>$pwd<br/><br/>";
      if(validation())
      {
      echo "Please give us up to 12hrs to validate you (normally it be done within an hour) if you have not been after this period of time u can email the owner at: afta_drk@hotmail.com";
      }
      $tolog = true;
    }
    echo "</p>";
    }
    echo "<p>";
    if($tolog)
    {
    $msg = "\n Username: ".$uid." \n Password: ".$pwd." \n\n ".$sitename." is a nice friendly chat community we are glad to hav u with us :o) pls feel free to bring ya m8s along \n\n Thank You\n".$sitename."";
    $subj = "Registration details for ".$sitename."";
    $headers = 'From: owner@wapdesire.com' . "\r\n" .
    'Reply-To: owner@wapdesire.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    mail($email, $subj, $msg, $headers);
    echo "<a href=\"login.php?loguid=$uid&amp;logpwd=$pwd\"><img src=\"../images/home.gif\" alt=\"\"/>Login</a>";
    }else{
    echo "<b>0 </b><a accesskey=\"0\" href=\"index.php\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    }
    echo "</p>";
    echo "</body>";
    ?>
    </html>[/B]


    tried..it's a blind alley..
    incorrect code..always.

    i tried to eliminate also

    //session_start();

    from captcha.php, but
    nothing changes.. i think
    the problem could be on core.php
    somewhere in
    function registerform

    Leave a comment:


  • honkytonkman
    replied
    session_start(); ??
    if i'm not gettin' blind ,there is not on register.php (looks post behind where i put my page)
    i tried to get a registration using PC and my phones (2 different models) but
    incorrect Verification Code shows always..
    with my pc if i try to register me on some place where a captcha is present, registration goes well..
    i don't understand why only on register.php don't works..
    maybe ain't a cookie problem..but somethin'wrong in the codes

    Leave a comment:


  • honkytonkman
    replied
    i'll try it..captcha.php is in the same folder where
    register.php and core.php stand

    Added after 57 minutes:

    now it seemed work right ..but surprise!..
    always say me "Incorrect Verification Code"..
    but the code i put on it is right..
    i surrend..
    Last edited by honkytonkman; 09.08.10, 10:58.

    Leave a comment:


  • honkytonkman
    replied
    not working..using the codes you gave me it show me
    many errors about connecting database ( as $pstyle = gettheme1).
    i tried to insert some codes in my version but in this case
    the verification code don't appears..
    i use the old wapdesire xhtml version..

    my register page is:
    Code:
    ?php
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    //header('Content-type: application/vnd.wap.xhtml+xml'); 
    echo "<?xml version=\"1.0\"?>";
    echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <?php
    $uid = $_POST["uid"];
    $pwd = $_POST["pwd"];
    $cpw = $_POST["cpw"];
    $email = $_POST["email"];
    include ("config.php");
    include ("core.php");
    connectdb();
    $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
    $sitename = $sitename[0];
    $brws = explode("/",$HTTP_USER_AGENT);
    $ubr = $brws[0];
    echo "<head>";
    echo "<title>$sitename</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
    echo "</head>";
    echo "<body>";
    $ipr = getip();
    $uip = explode(".",$ipr);
    
    if((!canreg())||(isipbanned($ipr,$ubr)))
    {
        echo "<p>";
        echo "<img src=\"../images/notok.gif\" border=\"0\" alt=\"X\"/>Registration is closed at the moment";
        echo "</p>";
    }else{
    echo "<p>";
    ?>
    <img src="../images/point.gif" alt="!"/>
    Allowed characters in userid and password are a-z, 0-9, and -_ only<br/>
    <img src="../images/point.gif" alt="!"/>
    No vulgar words are accepted in Username<br/>
    <img src="../images/point.gif" alt="!"/>
    Username and Password must contain at least 4 characters<br/>
    <img src="../images/point.gif" alt="!"/>
    Username must begin with a letter and cannot contain capitals<br/>
    <img src="../images/point.gif" alt="!"/>
    Password will be case sensitive<br/>
    <?php
    $tolog = false;
    if(trim($uid)=="")
    {
        echo registerform(1);
    }else if(trim($pwd)=="")
    {
        echo registerform(2);
    }else if(trim($cpw)=="")
    {
        echo registerform(3);
    }else if(spacesin($uid)||scharin($uid))
    {
        echo registerform(4);
    }else if(spacesin($pwd)||scharin($pwd))
    {
        echo registerform(5);
    }else if($pwd!=$cpw)
    {
        echo registerform(6);
    }else if(strlen($uid)<4)
    {
        echo registerform(7);
    }else if(strlen($pwd)<4)
    {
        echo registerform(8);
    }else if(isdigitf($uid))
    {
        echo registerform(11);
    }else if(checknick($uid)==1)
    {
        echo registerform(12);
    
    }else if(checknick($uid)==2)
    {
        echo registerform(13);
    
    }else if(trim($email)=="")
    {
        echo registerform(14);
    
    }else if(register($uid,$pwd,$usx,$day,$month,$year,$ulc,$email,$info, $ubr)==1)
    {
        echo registerform(9);
    }else if(register($uid,$pwd,$usx,$day,$month,$year,$ulc,$email,$info, $ubr)==2)
    {
        echo registerform(10);
    }else{
    //$brws = explode(" ",$HTTP_USER_AGENT);
        //$ubr = $brws[0];
        //$fp = fopen("gallery/info.txt","a+");
        //fwrite ($fp, "\n".$uid."-".$pwd."-".$ipr."-".$ubr."\n");
        //fclose($fp);
        
      echo "Registration completed successfully!<br/>";
      echo "<br/><b>Username: </b>$uid<br/>";
      echo "<b>Password: </b>$pwd<br/><br/>";
      if(validation())
      {
      echo "Please give us up to 12hrs to validate you (normally it be done within an hour) if you have not been after this period of time u can email the owner at: afta_drk@hotmail.com";
      }
      $tolog = true;
    }
    echo "</p>";
    }
    echo "<p>";
    if($tolog)
    {
    $msg = "\n Username: ".$uid." \n Password: ".$pwd." \n\n ".$sitename." is a nice friendly chat community we are glad to hav u with us :o) pls feel free to bring ya m8s along \n\n Thank You\n".$sitename."";
    $subj = "Registration details for ".$sitename."";
    $headers = 'From: owner@wapdesire.com' . "\r\n" .
    'Reply-To: owner@wapdesire.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    mail($email, $subj, $msg, $headers);
    echo "<a href=\"login.php?loguid=$uid&amp;logpwd=$pwd\"><img src=\"../images/home.gif\" alt=\"\"/>Login</a>";
    }else{
    echo "<b>0 </b><a accesskey=\"0\" href=\"index.php\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    }
    echo "</p>";
    echo "</body>";
    ?>
    </html>
    my core:

    Code:
    function registerform($ef)
    {
      $ue = $errl = $pe = $ce = "";
      switch($ef)
      {
        case 1:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Pls type your username";
            $ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 2:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Pls type your password";
            $pe = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 3:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Pls type your password again";
            $ce = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 4:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Username is invalid";
            $ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 5:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Password is invalid";
            $pe = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 6:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Passwords dnt match";
            $ce = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 7:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Username must be 4 characters or more";
            $ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 8:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Password must be 4 characters or more";
            $pe = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 9:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Username is taken";
            $ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 10:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Unknown error pls try again l8r";
    
    break;
        case 11:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Username must start with a letter from a-z";
            $ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 12:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Username is reserved for admins of the site";
            $ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 13:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Please choose an appropriate username";
            $ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
        case 14:
            $errl = "<img src=\"../images/point.gif\" alt=\"!\"/> U must enter an email address";
            $ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
            break;
      }
      $rform = "<form action=\"register.php\" method=\"post\">";
      $rform .= "$ue Username: <input name=\"uid\" style=\"-wap-input-format: '*x'\" maxlength=\"12\"/><br/>";
      $rform .= "$pe Password: <input type=\"password\" name=\"pwd\" maxlength=\"10\"/><br/>";
      $rform .= "$ce Password: <input type=\"password\" name=\"cpw\" maxlength=\"10\"/><br/>";
      $rform .= "<img src=\"../images/point.gif\" alt=\"!\"/>Date Of Birth:<br/>";
      $rform .= "<select name=\"day\" value=\"01\">";
      $rform .= "<option value=\"01\">1</option>";
      $rform .= "<option value=\"02\">2</option>";
      $rform .= "<option value=\"03\">3</option>";
      $rform .= "<option value=\"04\">4</option>";
      $rform .= "<option value=\"05\">5</option>";
      $rform .= "<option value=\"06\">6</option>";
      $rform .= "<option value=\"07\">7</option>";
      $rform .= "<option value=\"08\">8</option>";
      $rform .= "<option value=\"09\">9</option>";
      $rform .= "<option value=\"10\">10</option>";
      $rform .= "<option value=\"11\">11</option>";
      $rform .= "<option value=\"12\">12</option>";
      $rform .= "<option value=\"13\">13</option>";
      $rform .= "<option value=\"14\">14</option>";
      $rform .= "<option value=\"15\">15</option>";
      $rform .= "<option value=\"16\">16</option>";
      $rform .= "<option value=\"17\">17</option>";
      $rform .= "<option value=\"18\">18</option>";
      $rform .= "<option value=\"19\">19</option>";
      $rform .= "<option value=\"20\">20</option>";
      $rform .= "<option value=\"21\">21</option>";
      $rform .= "<option value=\"22\">22</option>";
      $rform .= "<option value=\"23\">23</option>";
      $rform .= "<option value=\"24\">24</option>";
      $rform .= "<option value=\"25\">25</option>";
      $rform .= "<option value=\"26\">26</option>";
      $rform .= "<option value=\"27\">27</option>";
      $rform .= "<option value=\"28\">28</option>";
      $rform .= "<option value=\"29\">29</option>";
      $rform .= "<option value=\"30\">30</option>";
      $rform .= "<option value=\"31\">31</option>";
      $rform .= "</select><br/>";
      $rform .= "<select name=\"month\" value=\"01-\">";
      $rform .= "<option value=\"01-\">Jan</option>";
      $rform .= "<option value=\"02-\">Feb</option>";
      $rform .= "<option value=\"03-\">Mar</option>";
      $rform .= "<option value=\"04-\">Apr</option>";
      $rform .= "<option value=\"05-\">May</option>";
      $rform .= "<option value=\"06-\">Jun</option>";
      $rform .= "<option value=\"07-\">Jul</option>";
      $rform .= "<option value=\"08-\">Aug</option>";
      $rform .= "<option value=\"09-\">Sep</option>";
      $rform .= "<option value=\"10-\">Oct</option>";
      $rform .= "<option value=\"11-\">Nov</option>";
      $rform .= "<option value=\"12-\">Dec</option>";
      $rform .= "</select><br/>";
      $rform .= "<select name=\"year\" value=\"1992-\">";
      $rform .= "<option value=\"1992-\">1992</option>";
      $rform .= "<option value=\"1991-\">1991</option>";
      $rform .= "<option value=\"1990-\">1990</option>";
      $rform .= "<option value=\"1989-\">1989</option>";
      $rform .= "<option value=\"1988-\">1988</option>";
      $rform .= "<option value=\"1987-\">1987</option>";
      $rform .= "<option value=\"1986-\">1986</option>";
      $rform .= "<option value=\"1985-\">1985</option>";
      $rform .= "<option value=\"1984-\">1984</option>";
      $rform .= "<option value=\"1983-\">1983</option>";
      $rform .= "<option value=\"1982-\">1982</option>";
      $rform .= "<option value=\"1981-\">1981</option>";
      $rform .= "<option value=\"1980-\">1980</option>";
      $rform .= "<option value=\"1979-\">1979</option>";
      $rform .= "<option value=\"1978-\">1978</option>";
      $rform .= "<option value=\"1977-\">1977</option>";
      $rform .= "<option value=\"1976-\">1976</option>";
      $rform .= "<option value=\"1975-\">1975</option>";
      $rform .= "<option value=\"1974-\">1974</option>";
      $rform .= "<option value=\"1973-\">1973</option>";
      $rform .= "<option value=\"1972-\">1972</option>";
      $rform .= "<option value=\"1971-\">1971</option>";
      $rform .= "<option value=\"1970-\">1970</option>";
      $rform .= "<option value=\"1979-\">1979</option>";
      $rform .= "<option value=\"1978-\">1978</option>";
      $rform .= "<option value=\"1977-\">1977</option>";
      $rform .= "<option value=\"1976-\">1976</option>";
      $rform .= "<option value=\"1975-\">1975</option>";
      $rform .= "<option value=\"1974-\">1974</option>";
      $rform .= "<option value=\"1973-\">1973</option>";
      $rform .= "<option value=\"1972-\">1972</option>";
      $rform .= "<option value=\"1971-\">1971</option>";
      $rform .= "<option value=\"1970-\">1970</option>";
      $rform .= "<option value=\"1969-\">1969</option>";
      $rform .= "<option value=\"1968-\">1968</option>";
      $rform .= "<option value=\"1967-\">1967</option>";
      $rform .= "<option value=\"1966-\">1966</option>";
      $rform .= "</select><br/>";
      $rform .= "Sex:<br/>";
      $rform .= "<select name=\"usx\" value=\"M\">";
      $rform .= "<option value=\"M\">Male</option>";
      $rform .= "<option value=\"F\">Female</option>";
      $rform .= "</select><br/>";
      $rform .= "Country: <input name=\"ulc\" maxlength=\"100\"/><br/>";
      $rform .= "Email: <input name=\"email\" maxlength=\"50\"/><br/>";
      $rform .= "Info: <input name=\"info\" maxlength=\"100\"/><br/>";
      $rform .= "<input type=\"Submit\" name=\"Register\" Value=\"Register\"></form>";
      $rform .= "<br/>$errl";
    
      return $rform;
    }

    Leave a comment:


  • honkytonkman
    replied
    thanks a lot buddy ..

    Leave a comment:


  • honkytonkman
    replied
    Originally posted by pego
    Yeah.. Use captcha image code.. Like.. Register | Gretongers Mania :-D
    someone can teach me how to insert a captcha image code as it..i use a wapdesire script

    Leave a comment:


  • something else
    replied
    use a captcha

    Leave a comment:


  • Lee
    replied
    how do u meen floodin mate? what do they do to flood ya

    Leave a comment:


  • stop flooding in registration on wapdesire v2?

    hi anyone know how to stop ppl flooding registration on wapdesire v2 script plz???
Working...
X