Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8356555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:13:45+00:00 2026-06-09T10:13:45+00:00

I recently made a portfolio website and put it online on 000webhost.com . Today

  • 0

I recently made a portfolio website and put it online on 000webhost.com. Today when I logged in, the account was suspended because someone sent more then 70 emails in a minute via my contact form – something that the webhosting does not allow.

I am looking for some way to stop this from hapening again. I used both php and javascript/jquery for form validation.

This is my curent php validation code.

$firstName = $_POST["firstName"];
$lastName = $_POST["lastName"];
$email = $_POST["email"];
$message = $_POST["message"];
$to = "fox.team001@gmail.com";
$subject = $firstName . " " . $lastName;
$headers = "From: " .$firstName . " " . $lastName . "\r\nReply-To:" . $email;

 if(validateEmail($email)){
     @mail($to , $subject , $message , $headers);

 }

validate($firstName , $lastName , $email , $message);
function validate ($firstName , $lastName , $email , $message){
    if(!empty($firstName) && !empty($lastName)  && !empty($email) && !empty($message)){
        if(validateEmail($email)){
            header("refresh:5; url=http://www.foxteam.net");
        }else{
           header("refresh:0; url=http://www.foxteam.net/contact.php");
        }
    }else{
       header("refresh:0; url=http://www.foxteam.net/contact.php");
    }
}   
function validateEmail($email) {
    $pattern = "^[A-Za-z0-9_\-\.]+\@[A-Za-z0-9_\-]+\.[A-Za-z0-9]+$";
    if(preg_match("/{$pattern}/", $email)) {
        return true;
    }else{
        return false;
    }
}

Can anyone tell me how can I stop spammers to send spam emails?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:13:46+00:00Added an answer on June 9, 2026 at 10:13 am

    It’s very hard to stop spam coming through a contact form completely, however there are a number of methods you can use to reduce it, some of which include:

    1. Use a honeypot – the idea behind this is to have a hidden field on your form with a generic name (e.g. answer), if this field has anything in it, then don’t bother sending the email (but still tell the user that the email has been sent) – it is obviously spam as there is no other way the field could have been filled out.
    2. IP limiting – store the user’s IP address somewhere and limit the number of emails per minute/hour that each IP address can send.
    3. Word filtering – have a list of words, if any are found then don’t send the email (usualy words like viagra, penis, etc).
    4. CAPTCHA, to me, this is a last resort. If you do use one, implement recaptcha, it is by far the best one around. But as I say, use this as a last resort, there are plenty of other methods you can use without annoying the users of your website.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok. I recently made some updates to this website. http://annberingerart.com/index.php Upon making some minor
So I have a website that I recently made changes to, and one of
I recently made a website, and it works fine on all browsers, but on
I recently made a simple game where user can submit his/her high scores online.
I've recently made an UserControl , which took quite a long time, because I
I recently made a website but I'm having a really big problem with Internet
I recently made and hosted Catifier.com. It's working pretty good, except I have a
I recently made a Mootols script for my website. Using Fx.Morph, I succesfully created
Alright so I have recently made the decision to put every string in my
I recently made a website built over WordPress and in IE 8/9 I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.