Spam-X
[ class tree: Spam-X ] [ index: Spam-X ] [ all elements ]

Class: IP

Source Location: /plugins/spamx/IP.Examine.class.php

Class Overview

BaseCommand
   |
   --IP

Examines Comment according to Personal IP Blacklist


Author(s):

  • Tom Willett, tomw AT pigstye DOT net

Methods


Inherited Variables

Inherited Methods


Class Details

[line 33]
Examines Comment according to Personal IP Blacklist



Tags:

author:  Tom Willett, tomw AT pigstye DOT net


[ Top ]


Class Methods


method execute [line 45]

int execute( string $comment)

The execute method examines the IP address a comment is coming from, comparing it against a blacklist of banned IP addresses.



Tags:

return:  0: no spam, else: spam detected


Overrides BaseCommand::execute() (parent method not documented)

Parameters:

string   $comment   Comment text to examine

[ Top ]

method reexecute [line 63]

int reexecute( string $comment, int $date, string $ip, string $type)

The re-execute method is used to mass-delete spam, essentially.

It does the same as execute, but is called with recorded comments in order to match them against new rules that were not in effect at the time of posting. To do that, it uses the IP address logged when the comment was saved.




Tags:

return:  0: no spam, else: spam detected


Parameters:

string   $comment   Comment text to examine
int   $date   Date/time the comment was posted
string   $ip   IPAddress comment posted from
string   $type   Type of comment ('article', etc)

[ Top ]

method _matchRange [line 140]

boolean _matchRange( string $ip, string $range)

Private internal method to match an IP address against an address range



Tags:

return:  true if IP falls into the IP range, else false
link:  http://www.php.net/manual/en/function.ip2long.php#70707


Parameters:

string   $ip   IP address to check
string   $range   IP address range to check against

[ Top ]


Documentation generated on Thu, 24 May 2012 02:08:02 -0400 by phpDocumentor 1.4.3