problem in country and network

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    problem in country and network

    i tried to put ip2country codings but i got error

    Fatal error: Call to undefined function iptocountry() in /home/godzilla/public_html/index.php on line 3104


    i have inserted this coding in user profile
    PHP Code:
    ////////////////////////////////////////
    $uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'"));
    $IPaddress=$uipadd[0];
    $two_letter_country_code=iptocountry($IPaddress);
    echo 
    "<b>Flag:</b> <img src=\"flags/$two_letter_country_code.gif\" alt=\"*\" /><br/>\n";
    echo 
    "<b>Country:</b> $two_letter_country_code<br/>";
    $subno = mysql_fetch_array(mysql_query("SELECT subno FROM ibwf_users WHERE id='".$who."'"));
    echo 
    "<b>Network:</b> $subno[0]</br>";
    //////////////////////////////////////// 

    and this as sql

    PHP Code:
    --
    -- 
    Table structure for table `network`
    --

    CREATE TABLE IF NOT EXISTS `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=1 ;

    --
    -- 
    Dumping data for table `network`
    --

    INSERT INTO `network` (`id`, `subone`, `subtwo`, `isp`, `country`, `flag`) VALUES
    (1, '149.254.0.0', '149.254.255.255', 'T-Mobile', 'United Kingdom', 'uk.gif'),
    (
    2, '196.11.239.0', '196.11.246.255', 'MTN', 'South Africa', 'za.gif'),
    (
    3, '59.88.0.0', '59.99.255.255', 'BSNLNET', 'India', 'in.gif'),
    (
    4, '218.248.0.0', '218.248.255.255', 'BSNLNET', 'India', 'in.gif'),
    (
    5, '196.200.0.0', '196.207.255.255', 'Vodacom', 'South Africa', 'za.gif'),
    (
    6, '203.145.131.0', '203.145.131.255', 'Bharti Cellular', 'India', 'in.gif'),
    (
    7, '203.145.128.0', '203.145.128.15', 'Bharti Cellular', 'India', 'in.gif'),
    (
    8, '203.145.188.128', '203.145.188.135', 'Bharti Cellular', 'India', 'in.gif'),
    (
    9, '202.56.231.112', '202.56.231.127', 'Bharti Cellular', 'India', 'in.gif'),
    (
    10, '203.145.159.32', '203.145.159.47', 'Bharti Cellular', 'India', 'in.gif'),
    (
    11, '58.104.0.0', '58.111.255.255', 'Optus', 'Australia', 'au.gif'),
    (
    12, '61.88.0.0', '61.88.255.255', ' Optus', 'Australia', 'au.gif'),
    (
    13, '58.145.128.0', '58.145.159.255', 'Optus', 'Australia', 'au.gif'),
    (
    14, '220.236.0.0', '220.239.255.255', 'Optus', 'Australia', 'au.gif'),
    (
    15, '41.208.0.0', '41.208.63.255', 'MTN', 'South Africa', 'za.gif'),
    (
    16, '196.3.94.0', '196.3.94.255', 'MTC', 'South Africa', 'za.gif'),
    (
    17, '147.110.0.0', '147.110.255.255', 'Eskom', 'South Africa', 'za.gif'),
    (
    18, '196.36.0.0', '196.39.127.255', 'IS', 'South Africa', 'za.gif'),
    (
    19, '208.131.160.0', '208.131.191.255', 'Digicel', 'Jamaica', 'jm.gif'),
    (
    20, '213.6.35.0 ', '213.6.40.255', 'PALTEL', 'Palestine', 'pl.gif'),
    (
    21, '80.7.112.0', '80.7.127.255', 'NTL', 'United Kingdom', 'uk.gif'),
    (
    22, '117.96.0.0', '117.99.255.255', 'Bharti Airtel', 'India', 'in.gif'),
    (
    23, '212.141.0.0', '212.141.255.255', 'WIND Telecom', 'Italy', 'it.gif'),
    (
    24, '60.240.0.0', '60.241.255.255', 'TPG', 'Australia', 'au.gif'),
    (
    25, '192.118.8.0', '192.118.11.255', 'Partner Communications', 'Israel', 'il.gif'),
    (
    26, '41.242.0.0', '41.242.255.255', 'TelKom', 'South Africa', 'za.gif'),
    (
    27, '203.192.192.0', '203.192.255.255', 'In2cable', 'India', 'in.gif'),
    (
    28, '202.69.192.0', '202.69.207.255', 'MTN (Virgin Media)', 'Sri Lanka', 'ce.gif'),
    (
    29, '203.145.137.160', '203.145.137.191', 'Idea Celular', 'India', 'in.gif'),
    (
    30, '202.78.232.0', '202.78.239.255', 'Alliance Braodband', 'India', 'in.gif'),
    (
    31, '202.75.128.0', '202.75.159.255', 'Maxis Communications', 'Maylaysia', 'my.gif'),
    (
    32, '75.126.0.0', '75.126.255.255', 'SoftLayer', 'United States', 'us.gif'),
    (
    33, '72.29.64.0', '72.29.95.255', 'Host Dime', 'United States', 'us.gif'),
    (
    34, '217.113.74.0', '217.113.74.255', 'CelTel', 'Belgium', 'be.gif'),
    (
    35, '193.35.128.0', '193.35.143.255', 'Orange', 'United Kingdom', 'uk.gif'),
    (
    36, '164.100.0.0', '164.100.255.255', 'Nicnet', 'India', 'in.gif'),
    (
    37, '213.26.0.0', '213.26.255.255', 'Telecomitalia', 'Italy', 'it.gif'),
    (
    38, '198.54.202.0', '198.54.202.255', 'Telkom', 'South Africa', 'za.gif'),
    (
    39, '155.239.208.0', '155.239.209.255', 'Telkom', 'South Africa', 'za.gif'),
    (
    40, '41.241.0.0', '41.241.255.255', 'TelKom', 'South Africa', 'za.gif'),
    (
    41, '155.239.165.0', '155.239.165.255', 'TelKom', 'South Africa', 'za.gif'),
    (
    42, '121.90.0.0', '121.90.255.255', 'Vodafone', 'New Zeland', 'nz.gif'),
    (
    43, '196.30.0.0', '196.30.255.255', 'Verzion', 'South Africa', 'za.gif'),
    (
    44, '196.46.240.0', '196.46.247.255', 'Vee Mobile', 'Nigeria', 'ng.gif'),
    (
    45, '72.27.0.0', '72.27.223.255', 'Digicel', 'Jamaica', 'jm.gif'),
    (
    46, '70.0.0.0', '70.14.255.255', 'Sprint Wireless', 'United States', 'us.gif'),
    (
    47, '86.128.0.0', '86.135.255.255', 'BT Braodband', 'United Kingdom', 'uk.gif'),
    (
    48, '217.42.0.0', '217.44.255.255', 'BT Braodband', 'United Kingdom', 'uk.gif'),
    (
    49, '82.132.192.0', '82.132.193.255', 'O2 Online', 'United Kingdom', 'uk.gif'),
    (
    50, '86.107.248.0', '86.107.255.255', 'Ambra', 'Romania', 'ro.gif'),
    (
    51, '84.23.96.0', '84.23.103.255', 'Etihadetisalat', 'South Africa', 'za.gif'),
    (
    52, '66.94.0.0', '66.94.31.255', 'T Mobile', 'United States', 'us.gif'),
    (
    53, '62.217.247.0', '62.217.247.255', 'Orange', 'Romania', 'ro.gif'),
    (
    54, '59.160.0.0', '59.165.255.255', 'Videsh Sanchar Nigam', 'India', 'in.gif'),
    (
    55, '212.183.128.0', '212.183.144.255', 'Vodaphone', 'United Kingdom', 'uk.gif'),
    (
    56, '201.219.18.0', ' 201.219.18.255', 'Telecsa', 'South Africa', 'za.gif'),
    (
    57, '213.6.0.0', '213.6.34.255', 'PalTel', 'Palestine', 'jo.gif'),
    (
    58, '168.209.0.0', '168.210.255.255', 'NedNet2', 'South Africa', 'za.gif'),
    (
    59, '203.88.0.0', '203.88.31.255', 'Max Telecom', 'India', 'in.gif'),
    (
    60, '124.43.0.0', '124.43.255.255', 'La Telecom', 'Sri Lanka', 'ce.gif'),
    (
    61, '203.145.134.192', '203.145.134.223', 'Idea Celular', 'India', 'in.gif'),
    (
    62, '219.91.128.0', '219.91.255.255', 'Iqara Telecom', 'India', 'in.gif'),
    (
    63, '220.233.0.0', '220.233.255.255', 'Exetel', 'Australia', 'au.gif'),
    (
    64, '58.160.0.0', '58.175.255.255', 'Telstra Bigpond', 'Australia', 'au.gif'),
    (
    65, '220.101.0.0', '220.101.191.255', 'Unwired', 'Australia', 'au.gif'),
    (
    66, '203.193.192.0', '203.193.223.255', 'Community Telco', 'Australia', 'au.gif'),
    (
    67, '121.208.0.0', '121.223.255.255', 'Telstra Bigpond', 'Australia', 'au.gif'),
    (
    68, '143.238.0.0', '143.238.255.255', 'Telstra Bigpond', 'Australia', 'au.gif'),
    (
    69, '203.220.0.0', '203.220.255.255', 'COMindico', 'Australia', 'au.gif'),
    (
    70, '124.176.0.0', '124.191.255.255', 'Telstra Bigpond', 'Australia', 'au.gif'),
    (
    71, '202.168.0.0', '202.168.63.255', 'Comindico', 'Australia', 'au.gif'),
    (
    72, '122.148.0.0', '122.149.255.255', 'Dodo', 'Australia', 'au.gif'),
    (
    73, '193.35.128.0', '193.35.143.255', 'Orange', 'United Kingdom', 'uk.gif'),
    (
    74, '86.148.0.0', '86.159.255.255', 'BT-Central Plus', 'United Kingdom', 'uk.gif'),
    (
    75, '205.239.0.0', '205.239.255.255', 'EDS', 'United States', 'us.gif'),
    (
    76, '193.113.200.0', '193.113.200.255', 'o2', 'United Kingdom', 'uk.gif'),
    (
    77, '141.1.0.0', '141.85.255.255', 'PUB-NET', 'Romania', 'ro.gif'),
    (
    78, '63.208.0.0', '63.215.255.255', 'Cricket Communications', 'United States', 'us.gif'),
    (
    79, '203.115.0.0', '203.115.63.255', 'Telecom', 'Sri Lanka', 'ce.gif'),
    (
    80, '116.0.0.0', '116.255.255.255', 'Lanka Communications', 'Sri Lanka', 'ce.gif'),
    (
    81, '203.194.0.0', '203.194.63.255', 'COMindico', 'Australia', 'au.gif'),
    (
    82, '195.189.142.0', '195.189.143.255', 'Opera Software Norway', 'Proxy', '-.gif'),
    (
    83, '64.152.0.0', '64.159.255.255', 'Level 3 Communications', 'United States', 'us.gif'),
    (
    84, '41.194.4.0', '41.194.4.126', 'Online-Malawi', 'South Africa', 'za.gif'),
    (
    85, '68.24.0.0', '68.31.255.255', 'Sprint', 'United States', 'us.gif'),
    (
    86, '211.28.0.0', '211.31.255.255', 'Optus', 'Australia', 'au.gif'),
    (
    87, '72.252.0.0', '72.252.255.255', 'Columbus Communication', 'Jamaica', 'jm.gif'),
    (
    88, '217.171.128.0', '217.171.143.255', 'Hutchison 3G', 'United Kingdom', 'uk.gif'),
    (
    89, '202.45.96.0', '202.45.127.255', 'Netspace', 'Australia', 'au.gif'),
    (
    90, '83.225.0.0', '83.225.255.255', 'Vodafone', 'Italy', 'it.gif'),
    (
    91, '85.195.119.14', '85.195.119.15', 'anonymouse.org', '(proxy)', '-.gif'),
    (
    92, '80.192.13.0', '80.192.13.255', 'Telewest', 'United Kingdom', 'uk.gif'),
    (
    93, '86.12.224.0', '86.12.255.255', 'NTL', 'United Kingdom', 'uk.gif'),
    (
    94, '203.20.32.0', '203.20.39.255', 'Vodafone', 'Australia', 'au.gif'),
    (
    95, '60.48.0.0', '60.54.255.255', 'Telekom', 'Malaysia', 'my.gif'),
    (
    96, '193.189.90.0', '193.189.91.255', 'MUSIWAVE(proxy)', 'France', 'fr.gif'),
    (
    97, '82.0.0.0', '82.31.255.255', 'NTL', 'United Kingdom', 'uk.gif'),
    (
    98, '82.37.232.0', '82.37.239.255', 'Telewest', 'United Kingdom', 'uk.gif'),
    (
    99, '219.64.0.0', '219.65.255.255', 'VSNL', 'India', 'in.gif'),
    (
    100, '125.16.0.0', '125.23.255.255', 'BHARTI', 'India', 'in.gif'); 
    i inserted every files like countries.php,unknown.php in ip_files folder and .gif flags in flags folder.

    please help me in that fatal error

    #2
    You havent defined iptocountry() function.. And trying to call it?

    Comment

    Working...
    X