Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

4 lines (4 sloc) 2.005 kB
<code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">require_once&nbsp;</span><span style="color: #0000BB">dirname</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'/../helper.php'</span><span style="color: #007700">;<br />require_once&nbsp;</span><span style="color: #DD0000">'Zend/Service/Akismet.php'</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;required:&nbsp;the&nbsp;blog&nbsp;URI<br /></span><span style="color: #0000BB">$blog&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'http://www.simonecarletti.com/blog'</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;create&nbsp;a&nbsp;new&nbsp;Akismet&nbsp;client&nbsp;instance<br /></span><span style="color: #0000BB">$akismet&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Zend_Service_Akismet</span><span style="color: #007700">(</span><span style="color: #0000BB">AKISMET_API_KEY</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$blog</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;verify&nbsp;key&nbsp;and&nbsp;print&nbsp;a&nbsp;notification<br /></span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">$akismet</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">verifyKey</span><span style="color: #007700">())&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Key&nbsp;is&nbsp;valid.\n"</span><span style="color: #007700">;<br />}&nbsp;else&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Key&nbsp;is&nbsp;not&nbsp;valid\n"</span><span style="color: #007700">;<br />}<br /></span>
</span>
</code>
Jump to Line
Something went wrong with that request. Please try again.