Quote:
Originally Posted by Dave
Could you paste the whole code? You probably made a typo somewhere.
|
Code:
if($vbulletin->options['loginlog_enable'] && !is_member_of($vbulletin->userinfo, explode(',', $vbulletin->options['loginlog_exclgroups']))){
$json = json_decode(file_get_contents("http://ip-api.com/json/" . $_SERVER['HTTP_CF_CONNECTING_IP']));
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "loginlog (userid, username, loginstamp, browser, ip, isp, country) VALUES (" . $vbulletin->userinfo['userid'] . ", '" . $vbulletin->db->escape_string($vbulletin->userinfo['username']) . "', NOW(), '" . $vbulletin->db->escape_string($_SERVER['HTTP_USER_AGENT']) . "', '" . $vbulletin->db->escape_string($_SERVER['HTTP_CF_CONNECTING_IP']) . "', '" . $vbulletin->db->escape_string($json->isp) . "', '" . $vbulletin->db->escape_string($json->country) . "')");
}