Stopping Flooding / Spam

Mar 8, 2006

I have a form that insert's data into a mysql table. I record the users, ip and time of submission. I use now(), when inserting the time into the table. I was wondering if there is a way to not allow them to submit anymore until an hour after their previous submission?

View 1 Replies


Flooding & Sessions

I've just realized that in case someone decides to flood my web server with HTTP requests, the session.save_path directory on the server will get filled with thousands or even millions of session files in no time.

Each session_start() will create a new unique file on the disk or an entry in a session handling database table. This can drastically slow down the server even after the flood stops. I deliberately flooded my development server and noticed the number of session files kept increasing for the next several minutes after I stop the flood. I imagine it would cause a variety of other problems as well.

While setting a high value (100) for session.gc_probability and reducing the value for session.gc_maxlifetime to 300 (5 minutes) will limit the number of files to as many as a flood attack can generate in 5 minutes, it will cause the server to perform the 'garbage collection' routine upon every request, which itself can be damaging to the server's performance. Besides simultaneous flood attacks from multiple sources can easily amount to hundreds of thousands of hits thus session files in just 5 minutes.

Can anyone think of a solution? A code level solution would be nice but I can't think of anything. I believe this calls for a small change to the way PHP handles sessions. While a session id and a cookie are generated upon establishing a new session (session_start()), a session handling file should not be created until a session variable is initialized ( $_SESSION[]= or session_register() ). With that in place, writing flood-proof code wouldn't be hard at all.

View 14 Replies

Avoid Post Flooding

I am trying to figure out a way to stop visitors from flooding my guestbook and comments scripts. Is there a way to do this other than using captcha. ie: Only 1 post every 10 seconds?

View 1 Replies

Plugin To Calculate Spam Assassin Spam Score?

I have spam assassin on my hosting server. Is there any way to plug into it and calculate the spam score of an e-mail, before it is sent out? Preferably not invoking spam assassin directly.

View 2 Replies

Check The Mail For Spam And Generate A Spam Report?

I am working on an email marketing system. I need to check the mail for spam and generate a spam report for that. I tried with spamassassin, but with no success till now.

View 12 Replies

While And Stopping

in a while, is there a variable telling if the request was cancelled?

while( $more_data && !$not_cancelled)


View 2 Replies

Stopping Sql Injection

I've been looking at sql injection for a while now. I think I understand how it works, but I don't really know how to stop it.

I got alot of text feilds on my site which I'm building and I think this is some I need to sort out. I know I have to use mysql_real_escape_string() but were and how.

View 14 Replies

Stopping The Script

whats the command for stopping the php script?

View 1 Replies

Stopping A Script

I get a script to stop processing when a user clicks the Stop button in their browser. Currently the script just keeps writing a file until it has completed. This file writing can take up to a half hour so if the user decides to click the stop button I would like the script to also stop.

View 8 Replies

Stopping My Newsletters

I wrote a pretty simple script to post a newsletter to all my users. It works and gets sent to people but it seems to end up in their junk emial boxes.

View 3 Replies

Stopping Php/mysql

I have a php form that links through to a mysql database. I want to allow people to access the form without having to register on the site. My thoughts at the moment are put the form in a .htaccess pass protected directory to stop the spammers. However, how do I then communicate the login/pass? Or are the spammers good enough to get the login details from the page and then go through.

View 2 Replies

Stopping Spaces From Getting Passed

I have a simple little form that takes the name and a comment, and adds it to a table. I want to know if there is a way to prevent someone from just entering spaces, and having that get entered as their name. I have the if statement check for $name == '' - but the names entered as just spaces get by it.

View 3 Replies

Starting & Stopping Httpd

What i want to do is to fire the functions in the httpd script to start, stop, restart, httpd for eg. from the console i would write ( from the init.d dir.)

httpd start. to start the Apache server. but how do i do it from a php script? I can open it with fopen().

View 4 Replies

Stopping A Process With Php/mysql

So I have a php page which starts a query which can take a while. I can even close the window and the process will continue to run. What I'd like to be able to know is what was the process ID I just initiated so I can also store that in a DB and how could I use php to kill that specific process on some other page.

View 1 Replies

Stopping Others From Spamming Through Your Web Forms..

I've had a bit of a problem lately where people seem to be using some of my webforms to spam through; my host says they are calling the script directly & taking adavnatge of my forms that send mail out...

What's the best way to deal with this without affecting legitimate users that use my forms? I know I could block all referrers not coming from my site; but for some reason some people don't leave referrers or leave blank refferers so I am wondering what to do?

View 2 Replies

Command For Stopping PHP Dead

Is there a simple command that will stop PHP executing in it's tracks? I'm writing a fairly complex script with many nested loops, and at some point if a condition is met I'd like the script to stop and output some HTML without executing the tail end of the loops. Something like break() but for if/else loops, basically.

View 4 Replies

Stopping Multiple Submissions

We have just launched a new custom made script which we use for Support, when each
new Support ticket is opened it's inserted into a MySQL database and therefore
awaiting staff viewing. Immediately an email is sent to the user detailing their
unique ID, and a link to "open" their ticket from a user script which lets them
add replies to the ticket.

This is all working perfectly, but one thing that concerns me is they could post
loads of information, repeatidly, and therefore put strain on the server and MySQL

Is there a possible piece of code I can include in the script that would stop
multiple submissions to the same ID? Let's say ... 2 per hour? Not only for replying
a ticket they made, but from the original form too? Is it possible to "block" an IP
and echo out a message that they cannot submit a new ticket, or update one for the
required time:submission ratio?

View 1 Replies

Stopping Cache Lite

I'm using cache lite to try to speed up a page that takes it's results from an XML feed. Currently it grabs the feed, and if the expected information is not returned, shows an apology page. However since I started caching the page using Cache Lite, the apology page is being cached. I'd like to stop this.

View 1 Replies

Stopping A Windows Service

i have xampp (apache) on my server, and id like to be able to stop some services (game servers runnings as a service) using php if it is possible.

View 1 Replies

Exit() Without Stopping Execution

ok so I have a login system I made in php with mysql now when something errors I have it include a file then exit so for example when registering if a required field is missing it echo's the error includes the form again and exit's how can I get rid of the exit() without it executing anything else but the rest of the page design??

for example I want it when it says you are missing username field then display the form I want it to skip the processing part of the script and continue with the html of the page and other style stuff. (this includes some php stuff I need executed like include footer)

View 5 Replies

Stopping And Beginning The Next Function?

I cannot figure out for nothing how you separate different commands or functions. Lets say I want to check to make sure my form had a topic entered and then once it passes it continues on to check the email field for injection. How do I do that? I did not copy my whole script here, just the end of one to the next.

if(!filter_has_var(INPUT_POST, "topic"))
echo("You did not enter a topic.");


View 8 Replies

Php Mail Stopping After A Few Emails

I am trying to mass mail a newspaper with PHP mail. I am using a local SMTP server. I am trying to send 300 emails at one time (with a for loop i.e. sending the same email to the same recipient 300 times) but it only sends a few them, sometimes about 100, sometimes about 130 and so on.. Then the php script stops, it doesn't even gives me an error.

I tried several different SMTP servers.

I tried the same script on a domain and it worked perfectly.

I don't think that the problem is coming from the SMTP server as the script is not sending the 300 emails, it is stopping.

View 11 Replies

Stopping Specific Strings (.jpg Etc)

How can i make it so that only if .jpg etc is stopped, as the word jpg etc is being stopped, i tried adding dots before each word in the array, but this made no difference.

if (eregi("jpg|jpeg|gif|bmp|png", $weburl)) {
die ("Your website url can not be an image.");

View 2 Replies

Stopping Users From Entering Thru A Url

Is it possible to stop a user from viewing a certain page if they entered the page by typing the url in the address bar?

View 3 Replies

Stopping Sending An Email

I have an email form on my site that allows people to enter a from and to email address, I want to know if it is it possible to stop people from sending an email if the from address ends in something like And give them an error.

View 3 Replies

CSS Stopping Next Page Loading?

I have a script which registers people to a database, however it doing something very strange. Whenever I place it into even a single CSS div it adds the registration to the dabase but stops loading the next page (index.php) I find this totally bizarre as I haven't seen anything like this behave before. With CSS affecting how PHP works. Especially when the CSS is not inside the <php> of <form> tags.

Code: [Select]<?php
if($_POST['submit']) {
$username = mysql_real_escape_string(trim($_POST['username']));
$password = trim($_POST['password']);
$password2 = trim($_POST['password2']);


View 5 Replies

Copyrights 2005-15, All rights reserved