Sign in:
Username:
Password:  
»Forgot your password?

Home | Forum | How to Protect Your Web Form | How to Protect Your Email | Sign Up

Insure yourself from spam! The Anti Spam Insurance Company - ProtectWebForm!

Forum - Image verification not working

PostMessage
stiehle
2006-12-30 07:48:20
I have successfully installed ProtectWebForm on one website and it has
been working fine since then. Yesterday, I installed PWF in the exact
same way on another website but it doesnīt work there.

I always get the message "The image code you have provided does not
match the actual one. ...", even when I type in the correct image
code.

Try it out yourself at:
http://www.articlesgoaround.com/contact.html

Could this be an issue with the webhost of this domain (Dreamhost) ?
oleg
2006-12-30 09:22:15
I can't see any verification request in my logs from your site.
Check, that Dreamhost allows "file_get_contents" function. If it
doesn't allow, try to replace it with smth. else, like fsockopen see:
http://www.protectwebform.com/forum/topic/32/
or
--------------------------------------------
if(!function_exists("file_get_contents") {
function file_get_contents($url){
$url_parsed = parse_url($url);
$fd = fsockopen($url_parsed[host], 80);
$data = ''; $header = false;
fputs($fd,"GET ".$url_parsed[path]." HTTP/1.0\r\n");
fputs($fd,"Host: ".$url_parsed[host]."\r\n");
fputs($fd,"Connection: close\r\n\r\n");
while($line = fgets($fd)) {
if($header) $data .= $line;
if(strlen($line) <= 2) $header = true;
}
fclose($fd);
return $data;
}
}
stiehle
2006-12-31 01:17:49
1. in the first line of the code you provided, thereīs a closing
bracket missing - that caused an error when I tried this code.
Correct: if(!function_exists("file_get_contents")) {

2. However, this didnīt help, so I asked Dreamhost support. They tell
me to use curl and instead of "file_get_contents", I should use this:

<?php
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, 'http://example.com');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);

// display file
echo $file_contents;
?>

I just donīt know what exactly I need to replace in the PWF code with
the above in order to make it work.

Thanks in advance for your help.
oleg
2006-12-31 06:47:51
well, create function then:
--------------------------------
function get_url_content($url) {
$ch = curl_init();
$timeout = 15;
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
return $file_contents;
}

--------------------------------
and replace "file_get_contents" in the code with "get_url_content"

baschwar
2007-03-08 21:51:57
I get the same trouble. I installed for one site at my host and it
works flawlessly. I installed for a second site at the same host, on
different machines and the 2nd site always says the code entered is
incorrect. The host is ICDSoft.com.

Good site: http://www.innertalk.com/comments.html
Bad site: http://www.horse-previews.com/calendarform.html

Both sites use formmail.pl
I've done the special edit to the PERL to change $in to $form, etc.

Help?

Brad
baschwar
2007-03-08 22:30:42
I found my problem... $form should be $Form -- capital F form. :(
Doc
2007-04-17 10:15:13
I have the same problem but two people have successfully comment so
why it doesn't work for me!!! The use is for cutenews, here is the
url:
http://foxriverprisonbreak.free.fr/index.php?subaction=showcomments&id=1176644665&archive=&start_from=&ucat=&
Doc
2007-04-17 10:40:50
Ok it's only when I use the same name that I use here...
Dmtalon
2007-05-05 14:30:29
Oleg!! You saved me... I am using the protectwebform for a site and
it was working fine for months. The hosting company moved the site to
a new server and broke the form protection. Looks like the
file_get_contents is disabled. I used your above function
(get_url_content) and I'm back in business

Thanks a million.

Dallace
revistazo1
2007-05-16 11:03:04
hi DOC i use cutenews how setting this code my problem is : The image
code you have provided does not match the actual one. Hit the 'back'
button of your browser and input the correct code please

how did you do it?

please help me






Post Reply:

You must be logged in to reply.
Post message
Name: 
Email: 
Url: 




Registered users: 20241

Forms protected: 48457

Further Reading & Anti Spam Resources:

Directory
Search our site for:
 
Web www.protectwebform.com

Get Thunderbird!

    ©Copyright 2006 ProtectWebForm.com. All rights reserved. Read our Privacy Policy

Page copy protected against web site content infringement by Copyscape