in common.php find abt line 19
- WeBid Version:
- 1.1.1/1.1.2
add afterPHP:session_start();
$error_reporting = E_ALL^E_NOTICE;
// $error_reporting = E_ALL; // use this for debugging
define('InWeBid', 1);
define('TrackUserIPs', 1);
dont forget to change your country name in echo and code on function(getUserCountry()PHP:function getUserCountry() {
$xml = simplexml_load_file("http://www.geoplugin.net/xml.gp?ip=".getRealIpAddr());
return $xml->geoplugin_countryCode;
}
function getRealIpAddr()
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
return $ip;
}
if (getUserCountry() != "IN") { // just change your country code like US, UK, NZ, IN for complete list visit https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
echo "<p>only country from India can access this website</P><p> for more info contact to care@mywebidsite.com</p>";
exit;
}
thats it folks![]()

Simple yet powerful tool to allow access from your country only 1.1
now you can restrict acceessto your webidsite except only your country