I found this old thread,
http://forums.pligg.com/questions-co...voters-ip.html
I guess its the same i want only for the flag to show up on the story details page next to the users avatar.
Custom coding?
Or with some work able to do with the info from the above old thread
Ok so how would this go?
copy this code in a .php ?
Code:
// make a valid request to the hostip.info API
if ($_SERVER['HTTP_X_FORWARD_FOR']) {
$ip = $_SERVER['HTTP_X_FORWARD_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
$url = "http://api.hostip.info/country.php?ip=".$ip;
// fetch with curl
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$country = curl_exec($ch);
curl_close ($ch); and call it in linksummary with {$ip} ?
{if $pagename eq "story" || $pagename eq "submit"}
<div style="float: left; top:5px; bottom:5px;">
<IMG SRC="http://api.hostip.info/flag.php?ip={$ip}" ALT="IP Address Lookup">
</div>
{/if}
Any help apreciated.