Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


Advertisements:




SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







Stopping Flooding / Spam


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 (Posted: 11:10 pm on Mar. 8, 2006)

Sponsored Links:

Related Forum Messages:
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.

Posted: February 4th, 2003, 06:12 AM

View 14 Replies!   View Related
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?

Posted: May 24, 2007, 03:07:47 PM

View 1 Replies!   View Related
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.

Posted: Sep 13 09 at 12:00

View 2 Replies!   View Related
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.

Posted: Feb 2, 2009, 00:43

View 12 Replies!   View Related
While And Stopping
in a while, is there a variable telling if the request was cancelled?

say:
while( $more_data && !$not_cancelled)
{
blabla

?

Posted: June 21st, 2007 12:15 PM

View 2 Replies!   View Related
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.

Posted: 04-03-2007, 08:25 AM

View 14 Replies!   View Related
Stopping The Script
whats the command for stopping the php script?

Posted: 07-22-2006, 11:58 PM

View 1 Replies!   View Related
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.

Posted: 09-13-2006, 10:24 PM

View 8 Replies!   View Related
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.

Posted: 10-02-2007, 07:10 AM

View 3 Replies!   View Related
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.

Posted: 01-03-2007, 07:53 AM

View 2 Replies!   View Related
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.

Posted: October 2nd, 2000, 05:24 PM

View 3 Replies!   View Related
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().

Posted: January 24th, 2003, 04:27 PM

View 4 Replies!   View Related
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.

Posted: May 07, 2007, 05:52:41 AM

View 11 Replies!   View Related
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.");
       }

Posted: July 14, 2007, 09:59:59 AM

View 2 Replies!   View Related
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?

Posted: March 29, 2007, 02:36:58 PM

View 3 Replies!   View Related
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.

Posted: 02-22-2006, 09:10 PM

View 1 Replies!   View Related
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 @paypal.com? And give them an error.

Posted: August 16, 2007, 02:51:51 PM

View 3 Replies!   View Related
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?

Posted: 11-09-2005, 05:59 PM

View 2 Replies!   View Related
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.

Posted: 08-11-2007, 07:57 PM

View 4 Replies!   View Related
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
server.

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?

Posted: 02-21-2007, 06:49 PM

View 1 Replies!   View Related
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.

Posted: 6:32 pm on Aug. 21, 2006

View 1 Replies!   View Related
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.

Posted: 08-27-2006, 06:05 PM

View 1 Replies!   View Related
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)

Posted: 02-04-2006, 05:54 AM

View 5 Replies!   View Related
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.");

[code]...

Posted: February 28th, 2011, 11:15 PM

View 8 Replies!   View Related
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
include("connect.php");
if($_POST['submit']) {
$username = mysql_real_escape_string(trim($_POST['username']));
$password = trim($_POST['password']);
$password2 = trim($_POST['password2']);

[Code]...

Posted: March 13, 2011, 02:35:32 PM

View 5 Replies!   View Related
Select A Different Db Without Stopping The Loop Of The First?
I have done select statements where you loop through all the records. But what I need to do is pull record from one database than insert parts of that record into the second. The issue I have is no knowing how to select a different db with out stopping the loop of the first.

Posted: January 23, 2011, 04:41:09 PM

View 3 Replies!   View Related
Stopping A Query For 5 Seconds?
im currently developing a text based game but ive hit a bit of a problem.

when players mug eachother they can just keep hitting F5 and mug (until they run out of energy etc)

but instead i would like it so after they mugged they then cant mug again for 5 seconds!

is there anyway this could be easily done?

an idea of how i could do it was maybe creating a value in their player table called last mug and it would be a time.... then i could try summert like if last mug <= 5 seconds from now then blah.... but im not too sure.

Posted: January 28, 2010, 02:20:43 PM

View 1 Replies!   View Related
Stopping Duplicate Registrations?
for some reason my code is allowing duplicate entries to be submitted and even blank entries. I'm not sure why, its like its skipping the entire checking process and going straight to entering it into the database.  I've been fiddling with it for a day or two, trying different things and this is what I have right now, this set of code comes after it checks to see if the input fields are empty.  Can anyone see anything wrong with this?

//If not empty, compare emails to database
$sql = "SELECT COUNT(*) FROM mytable WHERE email = '$email'";
$result = mysql_query($sql);

[code]...

Posted: April 13, 2010, 06:23:11 PM

View 11 Replies!   View Related
Stopping Execution Of An Included File?
I have a structure like this: Code:

/index.php
/dir_1/index.php
/dir_2/index.php
.
.
/dir_n/index.php

In the topmost index.php file i have a switch statement selecting the current active directory (e.g. dir_2) and including the index.php file in that dir, if it exists. Is there any way I can stop the execution of the included file (/dir_2/index.php) without affecting the calling file (/index.php)?

Posted: February 27th, 2003, 12:02 PM

View 3 Replies!   View Related
Stopping People From Reloading A Page
I have a form, and when submitted it inserts a new row into a database. If people reload the target page, I'm sure that it'll reinsert another duplicate row. How do I stop people from submitting info numerous times?

Posted: July 14th, 2006, 10:47 AM

View 14 Replies!   View Related
Stopping And Starting A Process Via Web Form
This sort of ties into my other thread I started. I just figured out how to compile the CGI binary version of PHP so now I can have the script I needed running in the background, do so right there at the web server. (PHP command mode is up and running beautifully right now)

Anyway, my question is in regards to making a form to start/stop/restart a particular running process on a Linux machine using PHP. The process will be my PHP script that I want running all the time in the background.

Starting is going to be pretty straightforward, as I can just use a system command functions to explicitly start the script I want to start. Such as exec("/path/to/the/script/background.php")

My trouble comes with how do I check to see if the script is currently running, and then give the option to stop it or restart it? I can make the stop function just do a system command exec("Kill -9 $PID") but how can I get the PID to pass to the kill function? Also I am vary wary of holding the the PID in a variable, because then my script could be called like "http://some.com/script.php?PID=3455" which would be a "Bad Thing" [TM].

I guess basically I need to know how to either kill via the name of the running process ("man kill" did not give me any hints about that) or another linux system command to give me the PID of a particular running process.

Also if anyone has any thoughts on the (in)security of this, and how I can make sure this is hack proof I would really appreciate it! It seems to me that as long as I reset any variables passed to the system to blank at the top of my script, then it wouldn't matter if someone passed a variable via the URL. But I don't know that for sure.

Posted: April 17th, 2002, 03:26 PM

View 3 Replies!   View Related
Stopping Multiple Users Using 1 Login
does anyone know any mysql transaction locking methods of some sort to stop a user from logging in at multiple places with one username, it must only allow one user with the username use that account. is there any way to stop that, as i have a subscription that people pay for and i want one user per username, how is that possible because there are many factors i had to consider, like if a user's session is loggged in a db and then they get removed when they logoff, but what if they don't logoff, what then?

Posted: June 13, 2007, 01:41:53 PM

View 7 Replies!   View Related
Stopping Form Inserting When Value = Null
I have a form that allows users to edit entries in the db. Thats all cool. My problem is that if any fields are left blank the form is inserting a '0' value when I need it to remain 'null'. How do I stop it inserting '0' values? Code:

Posted: May 23, 2007, 01:32:25 PM

View 4 Replies!   View Related
Stopping People Spamming My Mailform
Recently we have been having trouble with our mailform being hammered by spammers.
I am fairly certain that they are accessing the form outside of the site because the emails aren't valid (see email contents) and there is email validation on the form.

QuoteName = 144957a7-2ca2-4130-9f16-f715da818ed4
Email = 144957a7-2ca2-4130-9f16-f715da818ed4
Telephone = 144957a7-2ca2-4130-9f16-f715da818ed4
enquiry = 144957a7-2ca2-4130-9f16-f715da818ed4
Comments = 1 waitfor delay '0:0:20'--
Reset = Reset
02/04/07 - 20:43

I am looking for a way to reduce these spam attacks but do not want to go down the route of using captcha as i feel this may dissuade users entering forms. Is there a way of ensuring that a form has only been submitted via a valid refferer.

Posted: April 10, 2007, 08:56:34 AM

View 3 Replies!   View Related
Paypal Recurring Payments Stopping?
I am using recurring payments in Paypal. And successfully implemented.Now if the user choose another package, I need to start a new
recurring and stop current recurring.

Posted: Jun 13 at 9:34

View 1 Replies!   View Related
Prevent Imagecreatefromjpeg From Stopping Script?
I am using imagecreatefromjpeg on a shared host, so if the image is to big then imagecreatefromjpeg will give me an "out of memmory error" and terminate the script.Is there anyway to catch the out of memmory error, and simply let imagecreatefromjpeg fail(Return false) instead of terminating the script?

Posted: Sep 7 09 at 15:24

View 4 Replies!   View Related
Stopping Parallel Execution Of Script?
I am trying to stop my cron script from allowing it to run in parallel. I need it so that if there is no current execution of it, the script will be allowed to run until it is complete, the script timesout or an exception occurs.

I have been trying to use the PHP flock function to engage a file lock, run the script and then release the lock. However, it still looks like I am able to run the script multiple times in parallel. Am I missing something?

Btw, I am developing on Mac OS X with the Mac filesystem, maybe this is the reason the file locks are being ignored? Though the PHP documentation only looks about NTFS filesystems?

// Construct cron lock file path
$cronLockFilePath = realpath(APPLICATION_PATH . '/locks/cron');
// Get cron lock file
$cronLockFile = fopen($cronLockFilePath, 'r');

[Code]....

Posted: Jun 26 10 at 7:38

View 3 Replies!   View Related
Stopping Blank Values From Being Submitted
i have a compose message file with a form that inserts data into tables, i'm trying to figure out how to make an error appear if they have left a title or body blank, i'm not sure why this isn't working, here is the code

Code: [Select]<?php
session_start();
include_once "scripts/connect_to_mysql.php";
$logout = "";
$login_table = "";
$message_title= $_POST['message_title'];
[Code]....

Posted: May 06, 2010, 09:29:15 PM

View 3 Replies!   View Related
Stopping Posts Floods And Cookies
i dont understand whats going on. This always worked before... everytime someone makes a post i set a cookie

setcookie("Postflood",$ip,time()+POST_FLOOD);

post_flood is declared in globals as 30 - i.e 30 seconds between posts.

then when you go to make another post it does an isset($_COOKIE['postflood'])

even under 30 seconds it still doesnt see the cookie as having been set.... im not sure why this doesnt work?

Posted: July 02, 2010, 07:14:39 AM

View 7 Replies!   View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved