help me friend....

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

    help me friend....

    please help me setting this anti flood...please...

    ////////////////////////ANTIFLOOOOOOOOOOOOOOOOOD////////////////////
    if(isset($mess)){
    if($udata[3]==$antiflood){$FOUND=1;}
    if(trim($udata[2]) == trim($mess)) {$FOUND=1;}
    $first_check= substr(trim($udata[2]),1,11);
    if($first_check==substr(trim($mess),1,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),2,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),3,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),4,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),5,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),6,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),7,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),8,11)){$FOUND= 1;}

    if(!isset($FOUND)){
    $count_udata = strlen($udata[2]);
    if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-15),11))){$FOUND=1;}
    if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-14),11))){$FOUND=1;}
    if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-13),11))){$FOUND=1;}
    if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-12),11))){$FOUND=1;}
    }
    }
    /////////////////////////END OF ANTIFLOOD CHECK////////////////////

    $udata[3]=htmlspecialchars($udata[3]);
    $udata[3] = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)','', $udata[3]);
    $udata[3] = eregi_replace('([[:space:]()[{}]).[-a-zA-Z0-9@:%_\+.~#?&//=]+)','', $udata[3]);

    $udata[3] = filterBadWords($udata[3]);
    $udata[3] = substr(trim($udata[3]),0,160);
    if($sm==1&&$smilies_decode_num<=$smilies_decode)$u data[3] = ReplaceTextToSmilies($udata[3]);

    $smilies_decode_num++;
    $color = ++$c % 2 == 0 ? '<div>' : '<div class="divide">';
    echo"$color <span style=\"color : #$udata[1]; font-weight : bold;\">".htmlspecialchars($udata[2])." »</span>".$udata[3]."</div>";
    }
    }

    FClose($fp);

    /////////////////////WRITING A TEXT MESSAGE TO the FILE///////////////////////////

    #2
    Originally posted by neostream View Post
    please help me setting this anti flood...please...

    ////////////////////////ANTIFLOOOOOOOOOOOOOOOOOD////////////////////
    if(isset($mess)){
    if($udata[3]==$antiflood){$FOUND=1;}
    if(trim($udata[2]) == trim($mess)) {$FOUND=1;}
    $first_check= substr(trim($udata[2]),1,11);
    if($first_check==substr(trim($mess),1,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),2,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),3,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),4,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),5,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),6,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),7,11)){$FOUND= 1;}
    if($first_check==substr(trim($mess),8,11)){$FOUND= 1;}

    if(!isset($FOUND)){
    $count_udata = strlen($udata[2]);
    if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-15),11))){$FOUND=1;}
    if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-14),11))){$FOUND=1;}
    if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-13),11))){$FOUND=1;}
    if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-12),11))){$FOUND=1;}
    }
    }
    /////////////////////////END OF ANTIFLOOD CHECK////////////////////

    $udata[3]=htmlspecialchars($udata[3]);
    $udata[3] = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)','', $udata[3]);
    $udata[3] = eregi_replace('([[:space:]()[{}]).[-a-zA-Z0-9@:%_\+.~#?&//=]+)','', $udata[3]);

    $udata[3] = filterBadWords($udata[3]);
    $udata[3] = substr(trim($udata[3]),0,160);
    if($sm==1&&$smilies_decode_num<=$smilies_decode)$u data[3] = ReplaceTextToSmilies($udata[3]);

    $smilies_decode_num++;
    $color = ++$c % 2 == 0 ? '<div>' : '<div class="divide">';
    echo"$color <span style=\"color : #$udata[1]; font-weight : bold;\">".htmlspecialchars($udata[2])." »</span>".$udata[3]."</div>";
    }
    }

    FClose($fp);

    /////////////////////WRITING A TEXT MESSAGE TO the FILE///////////////////////////
    PHP Code:
    are u getting any error? Or its not working

    Comment

    Working...
    X