I have GeoIP installed on my website (not in vbulletin) and want to use a condition based on country
I have put this code in forums/index.php
PHP Code:
$efvip = $_SERVER['REMOTE_ADDR'];include('/home/myaccount/public_html/geo/geoip.inc');$gi = geoip_open('/home/myaccount/public_html/geo/ip/GeoIP.dat',GEOIP_STANDARD);$mygig = geoip_country_code_by_addr($gi, $efvip);$mycountry = array('AL','AZ');
In my forumdisplay template I have tried the following condition but the template gives an error in functions.
PHP Code:
<vb:if condition="!in_array($mygig,$mycountry, true)">
Any ideas how I can get this to work?