|
Web Contractors Web Developer Jobs Join Us / Log in Discussion |
Check for header injection attack and spam in your php form script
Submitted by rimian on Sun, 07/22/2007 - 04:58I wrote this to check for header injection attempts when processing a form that sends an email with php. (and I'll put it here so I can find it)
function is_spam( $message, $threshold = 1 ){
return _count_spam_body($message, $threshold) >= $threshold;
}
function _count_spam_body( $message, $threshold = 1 ){
$message = trim(strtolower($message));
//check the body of the message for spam or header injection attempts
$matches_bad = array(
"bcc:",
"cc:",
"to:",
"content-type:",
"mime-version:",
"multipart/mixed",
Hide your email from spiders - The easy way.
Submitted by rimian on Sun, 11/05/2006 - 11:21Many spiders look for the 'mailto' and @ characters in your links to farm email addresses.
Try this:
<a href="mailto:myemail@mydomian.com">Email me</a>
This uses special characters that substitute some characters in the link to fool the spiders!
Of course replace "myemail" and "mydomain.com" with your details.
New forum topics
- [MELB] Web Developer | Web Designer | Graphic Designer | Marketing Manager
- Open Source Online Invoicing Software
- Professional Drupal Consulting, Design & Development Services in Australia
- New Year Speacial-Professional Website for 400$ with doamin+Host
- Ruby on Rails Oceana
- WebDev/Design/Research/Consultant - PHP/MySql, Javascript, Joomla, HTML, Flash, AJAX
- Freelance ASP.NET Developer
- System Monitoring with Nagios
- Learning Ruby? What about the RubyMentor Project?
- Need a team
- JAOO Sydney/Brisbane 2009
- Get Your Business a Website for $399 ONLY !!!
- Concrete5: Another CMS!
- Manage The Cloud with Amazon Web Services
- Crystal Reports developer needed

