On Fri, 2007-03-02 at 13:08 -0500, Don Ireland wrote:
> Is there a way to have my PHP Script feed a message to SA to be 
> scanned?  I can save the message as a text file if that'll help.



#!/usr/bin/php -q
<?
open(TMP, ">/tmp/sa.$$") || die("Error opening temp file: /tmp/sa.$$");
print TMP $mess . "\r\n";
close(TMP);

my $score = qx!/usr/bin/spamc -c </tmp/sa.$$!;
chomp($score);
if ($? >> 8 == 1)
  echo "It's spam.\n";

unlink("/tmp/sa.$$");
?>

Derek


Reply via email to