etKey= raquo ;;
$ this- gt; sWebsiteUrl= raquo ;;
$ this- gt; sAuthName= raquo ;;
$ this- gt; sAuthEml= raquo ;;
$ this- gt; sAuthUrl= raquo ;;
$ this- gt; oAkismet=new Akismet ($ this- gt; sWebsiteUrl, $ this- gt; sMyAkismetKey);
$ this- gt; oAkismet- gt; setCommentAuthor ($ this- gt; sAuthName);
$ this- gt; oAkismet- gt; setCommentAuthorEmail ($ this- gt; sAuthEml);
$ this- gt; oAkismet- gt; setCommentAuthorURL ($ this- gt; sAuthUrl);
}
function isSpam ($ s) {(! $ this- gt; oAkismet) return false;
$this-gt;oAkismet-gt;setCommentContent($s);$this-gt;oAkismet-gt;isCommentSpam();
}
} lt; lt; lt; EOF
lt; style type= text/css gt; div {: 10px;
} label {: 90px;: left;: block;
}
lt;/style gt;
lt; form action= method= post gt;
lt; div gt; lt; label for= author gt; Автор lt;/label gt; lt; input id= author name= author type= text value= / gt; lt;/div gt;
lt; div gt; lt; label for= comment gt; Коментар lt;/label gt; lt; textarea id= comment name= comment cols= 20 rows= 4 gt; lt;/textarea gt; lt;/div gt;
lt; div gt; lt; input name= submit type= submit value= Відправити / gt; lt;/div gt;
lt;/form gt ;;
($ _ POST) { lt; pre gt; raquo ;; _ r ($ _ POST); lt;/pre gt; raquo ;;
$ sPostAuthor=$ _POST [ author ];
$ sCommentComment=$ _POST [ comment ];
$ oMySpamProtection=new MySpamProtection ();
$ sAuthorCheck=($ oMySpamProtection- gt; isSpam ($ sPostAuthor))? Автор відзначений як спам : Laquo; Автор НЕ МАЄ позначки як спам raquo ;;
$ sCommentCheck=($ oMySpamProtection- gt; isSpam ($ sCommentComment))? Коментар відзначений як спам : Laquo; Коментар НЕ МАЄ позначки як спам raquo ;;
echo $ sAuthorCheck. lt; br/ gt; . $ sCommentCheck;
}
? gt;
lt; div style= bottom: 0; position: fixed; gt;
lt; hr style= clear: both; / gt;
lt; h4 gt;
lt; a href= # justify" gt; lt;/h4 gt;
lt;/div gt;