hello, how do i install the flags or country name to the lavalair profiles, that people can see where people comming from how most i create that code for sql and index.php
Ip2country
Collapse
X
-
GuestTags: None
-
Guest
-
Guest
-
Guest
brandon if your not going to add anything constructive to this post and just be a troll then dont bother posting
and i think the wapdesire script has it in place but cant remember ive never added it to my old script[/b]
Comment
-
Guest
no wapdesire dont have it[/b]
Comment
-
Code:function ip() { if($_SERVER["REMOTE_ADDR"]){$ip=$_SERVER["REMOTE_ADDR"];} else{$ip=$_SERVER["HTTP_X_FORWARDED_FOR"];} if(strpos($ip,",")){ $exp_ip=explode(",",$ip); $ip=$exp_ip[0]; } return $ip; } function ipinrange($ip, $range1, $range2) { $ip=ip2long($ip); $range1=ip2long($range1); $range2=ip2long($range2); return (($ip >= $range1) && ($ip <= $range2)); } function network($ip,$opt) { $result=mysql_query("SELECT * FROM network ORDER BY subone, subtwo"); while($ranges=mysql_fetch_array($result)){ if(ipinrange($ip, $ranges[1], $ranges[2])){ if(is_file("flags/".$ranges["flag"])&&$opt==1){ $flag="<img src=\"flags/".$ranges["flag"]."\" alt=\"".$ranges["flag"]."\"/> "; } return $flag.$ranges["isp"]." ".$ranges["country"]; } } }
Code:echo "[b]network:[/b] ".network(ip(),1);
Code:-- phpMyAdmin SQL Dump -- version 2.11.0 -- [url]http://www.phpmyadmin.net[/url] -- -- Host: localhost -- Generation Time: Dec 03, 2007 at 03:05 PM -- Server version: 4.1.22 -- PHP Version: 5.2.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `aftadark_dump` -- -- -------------------------------------------------------- -- -- Table structure for table `network` -- CREATE TABLE `network` ( Â Â `id` int(255) NOT NULL auto_increment, Â Â `subone` text NOT NULL, Â Â `subtwo` text NOT NULL, Â Â `isp` text NOT NULL, Â Â `country` text NOT NULL, Â Â `flag` text NOT NULL, Â Â PRIMARY KEYÂ Â (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=101; -- -- Dumping data for table `network` -- INSERT INTO `network` VALUES(1, '149.254.0.0', '149.254.255.255', 'T-Mobile', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(2, '196.11.239.0', '196.11.246.255', 'MTN', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(3, '59.88.0.0', '59.99.255.255', 'BSNLNET', 'India', 'in.gif'); INSERT INTO `network` VALUES(4, '218.248.0.0', '218.248.255.255', 'BSNLNET', 'India', 'in.gif'); INSERT INTO `network` VALUES(5, '196.200.0.0', '196.207.255.255', 'Vodacom', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(6, '203.145.131.0', '203.145.131.255', 'Bharti Cellular', 'India', 'in.gif'); INSERT INTO `network` VALUES(7, '203.145.128.0', '203.145.128.15', 'Bharti Cellular', 'India', 'in.gif'); INSERT INTO `network` VALUES(8, '203.145.188.128', '203.145.188.135', 'Bharti Cellular', 'India', 'in.gif'); INSERT INTO `network` VALUES(9, '202.56.231.112', '202.56.231.127', 'Bharti Cellular', 'India', 'in.gif'); INSERT INTO `network` VALUES(10, '203.145.159.32', '203.145.159.47', 'Bharti Cellular', 'India', 'in.gif'); INSERT INTO `network` VALUES(11, '58.104.0.0', '58.111.255.255', 'Optus', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(12, '61.88.0.0', '61.88.255.255', ' Optus', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(13, '58.145.128.0', '58.145.159.255', 'Optus', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(14, '220.236.0.0', '220.239.255.255', 'Optus', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(15, '41.208.0.0', '41.208.63.255', 'MTN', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(16, '196.3.94.0', '196.3.94.255', 'MTC', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(17, '147.110.0.0', '147.110.255.255', 'Eskom', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(18, '196.36.0.0', '196.39.127.255', 'IS', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(19, '208.131.160.0', '208.131.191.255', 'Digicel', 'Jamaica', 'jm.gif'); INSERT INTO `network` VALUES(20, '213.6.35.0 ', '213.6.40.255', 'PALTEL', 'Palestine', 'pl.gif'); INSERT INTO `network` VALUES(21, '80.7.112.0', '80.7.127.255', 'NTL', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(22, '117.96.0.0', '117.99.255.255', 'Bharti Airtel', 'India', 'in.gif'); INSERT INTO `network` VALUES(23, '212.141.0.0', '212.141.255.255', 'WIND Telecom', 'Italy', 'it.gif'); INSERT INTO `network` VALUES(24, '60.240.0.0', '60.241.255.255', 'TPG', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(25, '192.118.8.0', '192.118.11.255', 'Partner Communications', 'Israel', 'il.gif'); INSERT INTO `network` VALUES(26, '41.242.0.0', '41.242.255.255', 'TelKom', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(27, '203.192.192.0', '203.192.255.255', 'In2cable', 'India', 'in.gif'); INSERT INTO `network` VALUES(28, '202.69.192.0', '202.69.207.255', 'MTN (Virgin Media)', 'Sri Lanka', 'ce.gif'); INSERT INTO `network` VALUES(29, '203.145.137.160', '203.145.137.191', 'Idea Celular', 'India', 'in.gif'); INSERT INTO `network` VALUES(30, '202.78.232.0', '202.78.239.255', 'Alliance Braodband', 'India', 'in.gif'); INSERT INTO `network` VALUES(31, '202.75.128.0', '202.75.159.255', 'Maxis Communications', 'Maylaysia', 'my.gif'); INSERT INTO `network` VALUES(32, '75.126.0.0', '75.126.255.255', 'SoftLayer', 'United States', 'us.gif'); INSERT INTO `network` VALUES(33, '72.29.64.0', '72.29.95.255', 'Host Dime', 'United States', 'us.gif'); INSERT INTO `network` VALUES(34, '217.113.74.0', '217.113.74.255', 'CelTel', 'Belgium', 'be.gif'); INSERT INTO `network` VALUES(35, '193.35.128.0', '193.35.143.255', 'Orange', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(36, '164.100.0.0', '164.100.255.255', 'Nicnet', 'India', 'in.gif'); INSERT INTO `network` VALUES(37, '213.26.0.0', '213.26.255.255', 'Telecomitalia', 'Italy', 'it.gif'); INSERT INTO `network` VALUES(38, '198.54.202.0', '198.54.202.255', 'Telkom', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(39, '155.239.208.0', '155.239.209.255', 'Telkom', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(40, '41.241.0.0', '41.241.255.255', 'TelKom', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(41, '155.239.165.0', '155.239.165.255', 'TelKom', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(42, '121.90.0.0', '121.90.255.255', 'Vodafone', 'New Zeland', 'nz.gif'); INSERT INTO `network` VALUES(43, '196.30.0.0', '196.30.255.255', 'Verzion', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(44, '196.46.240.0', '196.46.247.255', 'Vee Mobile', 'Nigeria', 'ng.gif'); INSERT INTO `network` VALUES(45, '72.27.0.0', '72.27.223.255', 'Digicel', 'Jamaica', 'jm.gif'); INSERT INTO `network` VALUES(46, '70.0.0.0', '70.14.255.255', 'Sprint Wireless', 'United States', 'us.gif'); INSERT INTO `network` VALUES(47, '86.128.0.0', '86.135.255.255', 'BT Braodband', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(48, '217.42.0.0', '217.44.255.255', 'BT Braodband', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(49, '82.132.192.0', '82.132.193.255', 'O2 Online', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(50, '86.107.248.0', '86.107.255.255', 'Ambra', 'Romania', 'ro.gif'); INSERT INTO `network` VALUES(51, '84.23.96.0', '84.23.103.255', 'Etihadetisalat', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(52, '66.94.0.0', '66.94.31.255', 'T Mobile', 'United States', 'us.gif'); INSERT INTO `network` VALUES(53, '62.217.247.0', '62.217.247.255', 'Orange', 'Romania', 'ro.gif'); INSERT INTO `network` VALUES(54, '59.160.0.0', '59.165.255.255', 'Videsh Sanchar Nigam', 'India', 'in.gif'); INSERT INTO `network` VALUES(55, '212.183.128.0', '212.183.144.255', 'Vodaphone', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(56, '201.219.18.0', ' 201.219.18.255', 'Telecsa', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(57, '213.6.0.0', '213.6.34.255', 'PalTel', 'Palestine', 'jo.gif'); INSERT INTO `network` VALUES(58, '168.209.0.0', '168.210.255.255', 'NedNet2', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(59, '203.88.0.0', '203.88.31.255', 'Max Telecom', 'India', 'in.gif'); INSERT INTO `network` VALUES(60, '124.43.0.0', '124.43.255.255', 'La Telecom', 'Sri Lanka', 'ce.gif'); INSERT INTO `network` VALUES(61, '203.145.134.192', '203.145.134.223', 'Idea Celular', 'India', 'in.gif'); INSERT INTO `network` VALUES(62, '219.91.128.0', '219.91.255.255', 'Iqara Telecom', 'India', 'in.gif'); INSERT INTO `network` VALUES(63, '220.233.0.0', '220.233.255.255', 'Exetel', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(64, '58.160.0.0', '58.175.255.255', 'Telstra Bigpond', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(65, '220.101.0.0', '220.101.191.255', 'Unwired', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(66, '203.193.192.0', '203.193.223.255', 'Community Telco', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(67, '121.208.0.0', '121.223.255.255', 'Telstra Bigpond', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(68, '143.238.0.0', '143.238.255.255', 'Telstra Bigpond', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(69, '203.220.0.0', '203.220.255.255', 'COMindico', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(70, '124.176.0.0', '124.191.255.255', 'Telstra Bigpond', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(71, '202.168.0.0', '202.168.63.255', 'Comindico', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(72, '122.148.0.0', '122.149.255.255', 'Dodo', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(73, '193.35.128.0', '193.35.143.255', 'Orange', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(74, '86.148.0.0', '86.159.255.255', 'BT-Central Plus', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(75, '205.239.0.0', '205.239.255.255', 'EDS', 'United States', 'us.gif'); INSERT INTO `network` VALUES(76, '193.113.200.0', '193.113.200.255', 'o2', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(77, '141.1.0.0', '141.85.255.255', 'PUB-NET', 'Romania', 'ro.gif'); INSERT INTO `network` VALUES(78, '63.208.0.0', '63.215.255.255', 'Cricket Communications', 'United States', 'us.gif'); INSERT INTO `network` VALUES(79, '203.115.0.0', '203.115.63.255', 'Telecom', 'Sri Lanka', 'ce.gif'); INSERT INTO `network` VALUES(80, '116.0.0.0', '116.255.255.255', 'Lanka Communications', 'Sri Lanka', 'ce.gif'); INSERT INTO `network` VALUES(81, '203.194.0.0', '203.194.63.255', 'COMindico', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(82, '195.189.142.0', '195.189.143.255', 'Opera Software Norway', 'Proxy', '-.gif'); INSERT INTO `network` VALUES(83, '64.152.0.0', '64.159.255.255', 'Level 3 Communications', 'United States', 'us.gif'); INSERT INTO `network` VALUES(84, '41.194.4.0', '41.194.4.126', 'Online-Malawi', 'South Africa', 'za.gif'); INSERT INTO `network` VALUES(85, '68.24.0.0', '68.31.255.255', 'Sprint', 'United States', 'us.gif'); INSERT INTO `network` VALUES(86, '211.28.0.0', '211.31.255.255', 'Optus', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(87, '72.252.0.0', '72.252.255.255', 'Columbus Communication', 'Jamaica', 'jm.gif'); INSERT INTO `network` VALUES(88, '217.171.128.0', '217.171.143.255', 'Hutchison 3G', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(89, '202.45.96.0', '202.45.127.255', 'Netspace', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(90, '83.225.0.0', '83.225.255.255', 'Vodafone', 'Italy', 'it.gif'); INSERT INTO `network` VALUES(91, '85.195.119.14', '85.195.119.15', 'anonymouse.org', '(proxy)', '-.gif'); INSERT INTO `network` VALUES(92, '80.192.13.0', '80.192.13.255', 'Telewest', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(93, '86.12.224.0', '86.12.255.255', 'NTL', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(94, '203.20.32.0', '203.20.39.255', 'Vodafone', 'Australia', 'au.gif'); INSERT INTO `network` VALUES(95, '60.48.0.0', '60.54.255.255', 'Telekom', 'Malaysia', 'my.gif'); INSERT INTO `network` VALUES(96, '193.189.90.0', '193.189.91.255', 'MUSIWAVE(proxy)', 'France', 'fr.gif'); INSERT INTO `network` VALUES(97, '82.0.0.0', '82.31.255.255', 'NTL', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(98, '82.37.232.0', '82.37.239.255', 'Telewest', 'United Kingdom', 'uk.gif'); INSERT INTO `network` VALUES(99, '219.64.0.0', '219.65.255.255', 'VSNL', 'India', 'in.gif'); INSERT INTO `network` VALUES(100, '125.16.0.0', '125.23.255.255', 'BHARTI', 'India', 'in.gif');
Comment
-
Guest
its in that script as im using the functions from it to get country and network from ip lol[/b]
Comment
-
Guest
-
Guest
the code i gave u will show ur country to show ur users jus change ip() to a sql to get the ip from the user table[/b]
Comment
Comment