A very cheap way of doing a quick and dirty check could be something like this:
<form name="form" method="post">
<!-- your other form fields -->
<input type="text" id="title" name="title" value="somethingsomething">
<input type="submit" value="send">
</form>
You can make the field invisible and choose a name, that a bot would definitely fill out. Choose anything meaningful just not something like "antispam" or the like.
input#title {
visibility: hidden;
height: 0;
width: 0;
}
And then just check if the input field got set:
<?php
if (isset($_POST["title"])) {
// a bot had filled the field now, do something
}
?>
The concept is called "honeypot". You can also check out this stackoverflow post here:
Better Honeypot Implementation (Form Anti-Spam)