Developer Support »

Method not allowed and gibberish  (See more user questions)

Hi

Thank you for a very informative question!

Just thinking, if your old form was sending duplicates and your new one
(mine) was initially getting a 405 Method Not Allowed error, I would have
some doubts about the integrity of the server setup.

That aside. I can address your gibberish question. As you might imagine,
it's pretty difficult to write code that can tell gibberish words from real
words. It did occur to me to check EVERY word submitted against a
dictionary but I can imagine that that would be a potential nightmare!

So I came up with the gibberish check which checks for consecutive vowels
and consecutive consonants. If a threshold limit is reached, the "word" is
rejected as gibberish. There is a quick way you can fix it to allow
"rhythmsystem" which has an amazing TEN consecutive consonants! You can
increase the gibberish threshold using this variable in the script:

$gibberish_threshold = 6;

The default value is 6, you would need to change it to 11 to allow
"rhythmsystem". That said, being quite a high threshold, it might also
allow a lot of the gibberish through. Alternatively you could disable the
check altogether.

Believe it or not, I already make allowances for email addresses. The
gibberish count stops if it hits a "@", "-", or ".", to allow for @ signs,
hyphens and periods in email addresses. This is the piece of code:

if($word_to_check[$i] == "@" || $word_to_check[$i] == "-" ||
$word_to_check[$i] == ".")

Your (interesting) example has none of these in the string "rhythmsystem"!
Whereas "r-l-s-a.com" would be ok because the consecutive count would stop
every time it hit a hyphen (I noticed from gibberish spam that hyphens, @
signs and periods were not used to punctuate the words).

Like I say, such a thing is not a perfect science (aside from only allowing
words from a dictionary!). I will give it some thought, see if I come up
with something. I might make it skip email addresses altogether.

You can change the error message for the gibberish. The message is
hard-coded into the script. Just locate it and change it. Locate this line
in the script (formtoemailpro.php):

if($set){$errors[] = "You have submitted a gibberish word:
\"{$return_value}\"";}

Change it to suit, save the file and upload it. Note that
\"{$return_value}\" in the above line of code, displays the gibberish word
in the error message. Other error messages are the same, they are
hard-coded into the script. You can locate them and change them as desired.

Any questions, just let me know.

Best wishes.

Charles Sweeney
https://formtoemail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Friday, February 06, 2009 2:26 PM
Subject: Re: FormToEmail-Pro script


Hi Charles,

Thanks for the fast response. I didn't do anything to it. Perhaps I tried
it too quickly after posting it. ??? I'm glad it's working now. I am
leaving for vacation late tonight and am hoping to have this in place before
I leave. (The form I am have been using is creating duplicate submissions.)

I got your test and then tested it myself. I was stopped by the gibberish
filter as it apparently doesn't like my email address .com.
I haven't changed the name of the email field but I will review the options
to see if I need to do something so it doesn't stop real people from getting
their inquiry through to me because of a strange domain name.

Can I elaborate of the message provided when someone is stopped by the
gibberish filter (and other filters)? As a person filling out the form, a
message that simply states: 'You have submitted a gibberish word:
".com"' probably isn't enough to indicate that their
submission wasn't accepted and what they might want to do to make it work.
Perhaps my domain name contains a fairly unique set of circumstances for the
giberish filter considering that the word rhythm is the only word in the
English language without a real vowel but I would think that a lot of domain
names are also abbreviations. My other domain is .com and obviously
contains a lot of special characters... I think your script also checks for
them.

Do you have any advice on how to provide a more informative message to the
user when their submission doesn't pass a filter?

Thank you!

----- Original Message -----
Sent: Fri, 6 Feb 2009 10:11:48 -0000
Subject: Re: FormToEmail-Pro script

Hi Matt.

Thank you for your purchase.

I just tried the form and it appears to be working. Did you fix it?

Charles Sweeney
https://formtoemail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Friday, February 06, 2009 4:38 AM
Subject: FormToEmail script


> Comments: I have added my own fields to your supplied form and put it on
> my website (after trying the free version and finding that it worked).
> When I try the form and click send, I get a HTTP 405 Method Not Allowed
> error message. What do I do to correct that? Have I messed up the script
> or is there a problem with the form?