Welcome to Dream.In.Code
Become a PHP Expert!

Join 149,999 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,325 people online right now. Registration is fast and FREE... Join Now!




Message board abuse/security

 
Reply to this topicStart new topic

Message board abuse/security

matt-the-mash
12 Dec, 2006 - 08:52 AM
Post #1

D.I.C Head
**

Joined: 10 Jul, 2006
Posts: 120



Thanked: 1 times
My Contributions
Im running a basic message board on one of my websites but have just started getting somebody who thinks it would be funny to fill up the boxes with B*ll**ks!!! mad.gif

I need to put some kind of security in place. Can anybody make some suggestions of the best way of achieving this. I dont really want the site visitors to go through a long process of registering to use the message board.

This post has been edited by matt-the-mash: 12 Dec, 2006 - 08:52 AM
User is offlineProfile CardPM
+Quote Post

skyhawk133
RE: Message Board Abuse/security
12 Dec, 2006 - 09:28 AM
Post #2

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 15,277



Thanked: 61 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
What message board software are you using?

If it doesn't have a CAPTCHA of some sort, you should start there. Then, look at renaming your fields to different names (username->gobblegobble).
User is online!Profile CardPM
+Quote Post

MathewS
RE: Message Board Abuse/security
12 Dec, 2006 - 10:32 AM
Post #3

D.I.C Regular
***

Joined: 14 May, 2002
Posts: 252



Thanked: 1 times
Dream Kudos: 1
My Contributions
You could also put in a 'timeout?' feature, where you are only allowed to post every x seconds
User is offlineProfile CardPM
+Quote Post

callumj
RE: Message Board Abuse/security
13 Dec, 2006 - 04:29 AM
Post #4

New D.I.C Head
*

Joined: 8 Jan, 2006
Posts: 14


My Contributions
Are you using email activation during the registration process?
User is offlineProfile CardPM
+Quote Post

matt-the-mash
RE: Message Board Abuse/security
13 Dec, 2006 - 09:47 AM
Post #5

D.I.C Head
**

Joined: 10 Jul, 2006
Posts: 120



Thanked: 1 times
My Contributions
The message board i am running is a basic php script using mysql database to retrieve the posts.

The entries that are being made, start with 'nice look site this...' Then the rest of the box is full of foriegn characters.

Because of the type of site it is on, i did'nt really want a registration process, i did'nt think there was any great need! How Naive crazy.gif

Im thinking, is it possible to log IP addresses and then ban them if abuse originates from them?

Or is it best to have short registration process to confirm the email address and then send a password?

Er, by the way, incase you havent guessed yet, im not a full-time programmer, but my php is getting better, so im looking for a quick fix if possible?
User is offlineProfile CardPM
+Quote Post

skyhawk133
RE: Message Board Abuse/security
13 Dec, 2006 - 09:50 AM
Post #6

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 15,277



Thanked: 61 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
An existing CAPTCHA script would be best. You won't stop humans that are gonna spam anyway, but you'll stop the bots which is probably what that is.
User is online!Profile CardPM
+Quote Post

alpha02
RE: Message Board Abuse/security
28 Dec, 2006 - 09:37 PM
Post #7

D.I.C Addict
Group Icon

Joined: 20 May, 2006
Posts: 687


Dream Kudos: 850
My Contributions
To be simpler, I made this little piece of code a while ago, it's an anti-flood feature but it works with sessions. Example:

CODE

/////some code before here

if ($_SESSION["antiflood"] < time() - 30) //replace 30 by the anti-flood time, in seconds
{
  //it is OK
  $_SESSION["antiflood"] = time();
  /*
  //Process post here...
  */
}
else
{
  //too early!
  echo "It is too early to post! Wait 30 seconds!";
}


Does this help?

EDIT: time() returns a timestamp, same as Date("U") which returns the number of seconds since the Unix Epoch. It increments of one each second. Use this for antiflood, timeout...

This post has been edited by alpha02: 28 Dec, 2006 - 09:48 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 08:25PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month