Login   Register  
PHP Classes
elePHPant
Icontem

File: spamc_example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Warble  >  spamc  >  spamc_example.php  >  Download  
File: spamc_example.php
Role: Example script
Content type: text/plain
Description: Example of usage
Class: spamc
Test if a message is spam with SpamAssassin server
Author: By
Last change:
Date: 2008-10-13 11:45
Size: 475 bytes
 

Contents

Class file image Download
<?php

// include the class
include_once("spamc.php");

// get the data to be filtered. This is must be a string. 
$email file_get_contents  "email_src.txt" )

// create the instance.
$spam = new spamc;

// configure the instance.
$spam->command 'PROCESS';


echo 
"<pre>";

// filter and check for errors, displaying the result.

if ($spam->filter($email)) {
     
print_r($spam->result);
} else {
     
print_r($spam->err);
}
echo 
"</pre>";

?>