Anti Flood on GuestBook and Shout

Started on the old forum in April 2011 · view the original in the archive · old links redirect here

#shout

4 replies · 916 views · started 15 years ago · 1 min read

4 participants
zubaer9 Newbie · 6 posts #1

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

i tryed at Shout bt it didnt work. here the 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();
    }
subzero Super moderator Fellow · 3,954 posts #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... _______…

zubaer9 Newbie · 6 posts #3

Please click one of the Quick Reply icons in the posts above to activate Quick Reply.

subzero wrote: if($_POST as $text){echo "$_OIS{{}}";}$text<>$post)Kick them

i dont Get it....

Anshul Senior · 296 posts #5

GumSlone wrote: 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

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close