[ class tree: plugins ] [ index: plugins ] [ all elements ]

Class: AkismetHttpClient

Source Location: /plugins/spamfilters/akismet.php

Class AkismetHttpClient

Class Overview

01.26.2006 12:29:28est

Akismet PHP4 class

Base class to assist in error handling between Akismet classes

Usage

  1.     $comment array(
  2.            'author'    => 'viagra-test-123',
  3.            'email'     => 'test@example.com',
  4.            'website'   => 'http://www.example.com/',
  5.            'body'      => 'This is a test comment',
  6.            'permalink' => 'http://yourdomain.com/yourblogpost.url',
  7.         );
  8.  
  9.     $akismet new Akismet('http://www.yourdomain.com/''YOUR_WORDPRESS_API_KEY'$comment);
  10.  
  11.     if($akismet->isError()) {
  12.         echo"Couldn't connected to Akismet server!";
  13.     else {
  14.         if($akismet->isSpam()) {
  15.             echo"Spam detected";
  16.         else {
  17.             echo"yay, no spam!";
  18.         }
  19.     }

Located in /plugins/spamfilters/akismet.php [line 222]

AkismetObject
   |
   --AkismetHttpClient
Author(s):
  • Bret Kuhns www.miphp.net
Information Tags:
Version:  0.3.3

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From AkismetObject

AkismetObject::errorsExist()
Check if any errors exist
AkismetObject::getError()
Return a specific error message from the errors array
AkismetObject::getErrors()
Return all errors in the object
AkismetObject::isError()
Check if a certain error exists
AkismetObject::setError()
Add a new error to the errors array in the object

[ Top ]
Property Summary
mixed   $akismetVersion  
mixed   $apiKey  
mixed   $blogUrl  
mixed   $con  
mixed   $errors  
mixed   $host  
mixed   $port  

[ Top ]
Method Summary
AkismetHttpClient   AkismetHttpClient()  
void   getResponse()  
void   _connect()  
void   _disconnect()  

[ Top ]
Properties
mixed   $akismetVersion = '1.1' [line 223]

[ Top ]
mixed   $apiKey [line 227]

[ Top ]
mixed   $blogUrl [line 228]

[ Top ]
mixed   $con [line 224]

[ Top ]
mixed   $errors = array() [line 229]

Redefinition of:
AkismetObject::$errors

[ Top ]
mixed   $host [line 225]

[ Top ]
mixed   $port [line 226]

[ Top ]
Methods
Constructor AkismetHttpClient  [line 233]

  AkismetHttpClient AkismetHttpClient( $host, $blogUrl, $apiKey, [ $port = 80]  )

Parameters:
   $host: 
   $blogUrl: 
   $apiKey: 
   $port: 


[ Top ]
getResponse  [line 242]

  void getResponse( $request, $path, [ $type = "post"], [ $responseLength = 1160]  )

Parameters:
   $request: 
   $path: 
   $type: 
   $responseLength: 


[ Top ]
_connect  [line 274]

  void _connect( )



[ Top ]
_disconnect  [line 282]

  void _disconnect( )



[ Top ]

Documentation generated on Tue, 30 Sep 2008 20:23:11 +0200 by phpDocumentor 1.4.1