2010年1月5日星期二

Re: [fw-webservices] Akismet flagging everything as spam

-- antum <ant@antbrown.com> wrote
(on Tuesday, 05 January 2010, 01:16 AM -0800):
> I downloaded the Zend Quick Start Application, added Akismet to the
> Guestbook signAction, but everything I pass it is coming back as spam.
>
> I create the Akismet object like this:
>
> $akismet = new Zend_Service_Akismet('apikey',
> 'http://antbrown.wordpress.com/');
>
> I then create the data structure based on $_SERVER arguments, the email
> address and comment.
>
> I pass it to the function $akismet->isSpam() and always get a true response
> even when changing IP's, email addresses and comments.
>
> Please let me know if there is anyway to debug this?

Pull the HTTP client from the service, and check to see what you've sent
and what the actual response was:

$client = $akismet->getHttpClient();

echo "Request: ", $client->getLastRequest(), "\n\n";
$response = $client->getLastResponse();
echo "Response: ", $response->getBody(), "\n";

If the service is consistently returning a true response to the isSpam
call, you may need to contact the Akismet developers to determine why.
Regardless, having a log of some requests and responses to provide them
will help.

--
Matthew Weier O'Phinney
Project Lead | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: