i use the 1 from the wapside script if theres a network it dnt recognise i get the ip ranges for that network and add them to my db easy as
Country Detecter Script Help
Collapse
X
-
s820brx7
-
Guest
Yeah u would have to add your ip if it is not found in the database
if u want a full list of all the ip and country u would have to buy it!
Comment
-
Guest
-
Guest
its here amy, GEOip db! found it on ubuntu forums, its a CSV file. but i dont have script to convert CSV to SQL.
Comment
-
someone please post ip to country codes for rw script please including everythin. spiderwap u have it also lamar does why don't u people share it?Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>
Comment
-
someone please post ip to country codes for rw script please including everythin. spiderwap u have it also lamar does why don't u people share it?[/b]
Comment
-
I'm trying to work my own code out, if i get anything right i'll post, but my plan will just have to work...
In a guys profile his phone and ip shows right?
I'm using a ip2country thing on my main site, gana see how its done in profiles with phone make and ip and follow that same example using ip2country... dont think it will be to difficult.....
Comment
-
bro wht did u just ask to change? ip(0) where?Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>
Comment
-
Guest
bro wht did u just ask to change? ip(0) where?[/b]
ip2country post
Comment
-
The ip2country script that spiderwap got was posted here somewere! 1st of all it only shows the 1st letter of a country and the flags are big and damn ugly! Hey sagar check if your country shows in profile on my site!
click here to join blingywap.co.za
http://blingywap.co.za
IF YOU NEED HELP JUST ASK AND ALWAYS SAY THANK YOU!
Comment
-
Code:public function getcountry_uid($uid) { $DB = new DB; $ip = $DB->FetchArray($DB->Query("SELECT IPAdd FROM {$GLOBALS['prefix']}members WHERE ID='".$uid."'")); $ip = long2ip(ip2long($ip[0])); $res = $DB->Query("SELECT ISO2 FROM {$GLOBALS['prefix']}ips WHERE (StartIP <= inet_aton('".$ip."') AND EndIP >= inet_aton('".$ip."'))"); if($get = $DB->FetchArray($res)) { $country = $DB->Query("SELECT CountryName FROM {$GLOBALS['prefix']}country WHERE ISO2 = '".$get[0]."'"); if($name = $DB->FetchArray($country)) { $CountryName = $name[0]; }else{ $CountryName = 'Unknown'; } }else{ $CountryName = 'Unknown'; } return $CountryName; } public function getcountry() { $DB = new DB; $ip = $this->getip(); $ip = long2ip(ip2long($ip)); $res = $DB->Query("SELECT ISO2 FROM {$GLOBALS['prefix']}ips WHERE (StartIP <= inet_aton('".$ip."') AND EndIP >= inet_aton('".$ip."'))"); if($get = $DB->FetchArray($res)) { $country = $DB->Query("SELECT CountryName FROM {$GLOBALS['prefix']}country WHERE ISO2 = '".$get[0]."'"); if($name = $DB->FetchArray($country)) { $CountryName = $name[0]; }else{ $CountryName = 'Unknown'; } }else{ $CountryName = 'Unknown'; } return $CountryName; } public function getcountryflag($country) { $DB = new DB; $iso = $DB->Query("SELECT ISO2 FROM {$GLOBALS['prefix']}country WHERE CountryName='".$country."'"); if($flag = $DB->FetchArray($iso)) { $temp = strtolower($flag[0]); if(is_file('Images/Country_Flags/'.$temp.'.png')) { $flagurl = 'Images/Country_Flags/'.$temp.'.png'; }else{ $flagurl = 'Images/Country_Flags/noflag.png'; } }else{ $flagurl = 'Images/Country_Flags/noflag.png'; } return $flagurl; } public function getip() { if (isset($_SERVER)) { if(isset($_SERVER["HTTP_X_FORWARDED_FOR"])) { $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; }else if(isset($_SERVER["HTTP_CLIENT_IP"])) { $ip = $_SERVER["HTTP_CLIENT_IP"]; }else{ $ip = $_SERVER["REMOTE_ADDR"]; } }else{ if(getenv('HTTP_X_FORWARDED_FOR')) { $ip = getenv('HTTP_X_FORWARDED_FOR'); }else if(getenv('HTTP_CLIENT_IP')) { $ip = getenv('HTTP_CLIENT_IP'); }else { $ip = getenv('REMOTE_ADDR'); } } return $ip; }
Attached Files
Comment
-
what do we do to update country lists in db? i don't know do we have to change the csv or the db?Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>
Comment
Comment