Anti Flood on GuestBook and Shout

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Anti Flood on GuestBook and Shout

    Hello,
    i need Help at anti Food on Shout and GuestBook.

    i tryed at Shout bt it didnt work.
    here the Code:
    PHP Code:
    //////////////////////////////////////////shout

    else if($action=="shout")
    {
      
    $shtxt $_POST["shtxt"];
        
    addonline(getuid_sid($sid),"Shouting","");

    $pstyle gettheme($sid);
          echo 
    xhtmlhead("Shout",$pstyle);
        echo 
    "<p align=\"center\">";
        if(
    getplusses(getuid_sid($sid))<75)
        {
            echo 
    "<img src=\"images/notok.gif\" alt=\"X\"/>You should have at least 75 plusses to shout!";
        }
          
    $whonick getnick_uid($who);
      
    $shtm time();
      
    $lastst mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_shouts WHERE id='".$uid."'"));
      
    $stfl $lastst[0]+getpmaf();

      if(
    $byuid==1)$stfl=0;
      if(
    $stfl>$shtm)
      {
      
    $rema $stfl $shtm;
      echo 
    "<img src=\"../images/notok.gif\" alt=\"X\"/>";
      echo 
    "Flood control: $rema Seconds<br/><br/>";
      }
      else{
    $shtxt $shtxt;
    //$uid = getuid_sid($sid);
    $shtm time();
    $res mysql_query("INSERT INTO ibwf_shouts SET shout='".$shtxt."', shouter='".$uid."', shtime='".$shtm."'");
    if(
    $res)
    {
    $shts mysql_fetch_array(mysql_query("SELECT shouts from ibwf_users WHERE id='".$uid."'"));
    $shts $shts[0]+1;
    mysql_query("UPDATE ibwf_users SET shouts='".$shts."' WHERE id='".$uid."'");
    $cow mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
    $cow $cow[0]-3;
    mysql_query("UPDATE ibwf_users SET plusses='".$cow."' WHERE id='".$uid."'");
      echo 
    "3 plusses have been deducted";
    echo 
    "<br/>";
        echo 
    "<img src=\"images/ok.gif\" alt=\"O\"/>Shout added successfully";
        }else{
            echo 
    "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
        }
                }
             echo 
    "<br/><br/><a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo 
    "Home</a>";
        echo 
    "</p>";
      echo 
    xhtmlfoot();
       exit();
        } 

    #2
    if($_POST as $text){
    echo "$_OIS{{}}";
    }

    $text<>$post)
    Kick them
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #3
      Please click one of the Quick Reply icons in the posts above to activate Quick Reply.
      Originally posted by subzero View Post
      if($_POST as $text){echo "$_OIS{{}}";}$text<>$post)Kick them
      i dont Get it....

      Comment


        #4
        you can put captcha to it, or mysql check it previous messge is equal to the current.
        Advertise your mobile site for FREE with AdTwirl

        Comment


          #5
          Originally posted by GumSlone View Post
          you can put captcha to it, or mysql check it previous messge is equal to the current.
          same can be achieved by changin shout text field in mysql to unique :-p

          Comment

          Working...
          X