Currently you need to add it manually to your sidebar of your template, we may release some Widget which will allow you to easily show these informations. But we're not sure about it, as it's sense is doubtable. But if you like to display some Informations you can do it with something like that within your Blog template:
- Code: Select all
<?php
echo ("<li id=wpids><h2>Latest caught Attacks:</h2><ul>");
$attackfields = array("GET","POST","REQUEST","SERVER REQUEST_URI","SERVER USER_AGENT","SERVER REFERER","COOKIE");
$records = $wpdb->get_results("SELECT `page`, `ip`, `tag`, `value` FROM $GLOBALS[table_prefix]sec_log ORDER BY id DESC LIMIT 10",ARRAY_A);
foreach ($records as $record)
{
echo ("<li title=\"".htmlspecialchars($record['value'])."\"><strong><a href=\"http://www.ip2location.com/$record[ip]\">".ereg_replace("[^[:digit:].]", "", $record[ip])."</a></strong><br />");
if ($record['tag']=='')
{
echo($attackfields[$record['attacked']]."=".htmlspecialchars(substr($record['value'],0,20)."...")."</li>");
}else
{
echo($record['tag']."=".htmlspecialchars(substr($record['value'],0,20)."...")."</li>");
}
}
echo ("</ul></li>");?>
This isn't a really nice approach as this can break with any newer Version of WPIDS, so you need to be careful with it. Anyway it show you how it's done at PHPIDS, in general.
Last bumped by Anonymous on Fri Dec 28, 2007 10:07 am.