/    Sign up×
Community /Pin to ProfileBookmark

how to prevent abuse using this script?

[url]http://www.webdevfaqs.com/php.php#mailer[/url]

like if the visitor from the same IP address cannot send more than 2 email…and also how to “force” the visitor the enter value? i dun wan a empty field to be send to me…

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@The_CheatFeb 29.2004 — never mind.,...doh!
Copy linkTweet thisAlerts:
@NevermoreFeb 29.2004 — I don't think you really need to make sure only 1 message per IP, just make it more difficult for people to send lots:

Put this on the line before the mail() function:
[code=php]
if($msg="") die("Please fill in the message field");//Stops people submitting with no text
sleep(10);//Waits 10 secs to stop abuse
[/code]
Copy linkTweet thisAlerts:
@The_CheatFeb 29.2004 — [i]Originally posted by cijori [/i]

[B]I don't think you really need to make sure only 1 message per IP, just make it more difficult for people to send lots:



Put this on the line before the mail() function:

[code=php]
if($msg="") die("Please fill in the message field");//Stops people submitting with no text
sleep(10);//Waits 10 secs to stop abuse
[/code]
[/B][/QUOTE]

that is not going to stop people from submitted a message with no text,

if you look closely, msg already is going to contain $msg = "Below is the result of your feedback form. It was submitted on $date at $time.nn";
Copy linkTweet thisAlerts:
@tanfwcauthorMar 02.2004 — hmmmm...thanx for the reply...then what should i do then?
×

Success!

Help @tanfwc spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...