I am willing to pay you to sort this out.....for me

Discussion in 'Programming' started by alan123, May 20, 2009.

  1. #1
    Hi

    Thanks for viewing this thread,

    The problem:

    I have uploaded a script and and configed the admin panel area,set up the db

    but then when i go the the url of the site i get this responce..

    Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /home/onlinem/public_html/search/includes/ip.php on line 11

    Here is the code around line 11:

    <?php

    define('SMALL', 0);
    define('BIG', 1);

    class ClientInfo {

    var $flag_dirs = array(SMALL => 'assets/flags/small', BIG => 'assets/flags/big');
    var $flag_ext = 'png';

    cfunction getctrybycode($code) {
    $countryArray = array();
    $input = "includes/countries.dat";
    $fd = fopen($input,"r") or die("Error: cannot open $input!");
    while ($buffer = fgets($fd,4096))
    {
    $buffer = preg_replace("/\n/","",$buffer); //chomp()
    $pieces = explode(",",$buffer);
    $countryCode = $pieces[0]; $countryName = $pieces[1];
    $countryArray[$countryCode] = $countryName;
    }
    fclose($fd);
    return $countryArray[$code];
    }

    if you need any more info just ask,

    if you can help please let me know how much you charge,payment through paypal,

    i need this sorted out asap,

    regards alan
     
    alan123, May 20, 2009 IP
  2. riya_senk

    riya_senk Well-Known Member

    Messages:
    2,013
    Likes Received:
    174
    Best Answers:
    0
    Trophy Points:
    160
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    Replace "cfunction getctrybycode($code) {" with function getctrybycode($code) {
     
    riya_senk, May 20, 2009 IP
  3. alan123

    alan123 Peon

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    Hi

    and thank you for your quick responce,i have tried what you have surgested and i am still getting the same responce,have you any other ideas

    regards
     
    alan123, May 20, 2009 IP
  4. Spawny

    Spawny Well-Known Member

    Messages:
    252
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    try
    <?php

    define('SMALL', 0);
    define('BIG', 1);

    class ClientInfo {

    var $flag_dirs = array(SMALL => 'assets/flags/small', BIG => 'assets/flags/big');
    var $flag_ext = 'png';

    function getctrybycode($code)
    {
    $countryArray = array();
    $input = "includes/countries.dat";
    $fd = fopen($input,"r") or die("Error: cannot open $input!");
    while ($buffer = fgets($fd,4096))
    {
    $buffer = preg_replace("/\n/","",$buffer); //chomp()
    $pieces = explode(",",$buffer);
    $countryCode = $pieces[0]; $countryName = $pieces[1];
    $countryArray[$countryCode] = $countryName;
    }
    fclose($fd);
    return $countryArray[$code];
    }
     
    Spawny, May 20, 2009 IP
  5. alan123

    alan123 Peon

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Hi

    I have sorted the problem out now with you help riya_senk i have deleted all the "c" for the ip.php file and its works,
    i am truly great full for your help,and if you give me your paypal email i will depost $20.00 for your help,
    regards alan
     
    alan123, May 20, 2009 IP
  6. ankit_frenz

    ankit_frenz Active Member

    Messages:
    1,111
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    63
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    i got late..that was easy :)
     
    ankit_frenz, May 20, 2009 IP
  7. nazdrovia.admin

    nazdrovia.admin Peon

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #7
    oops... came late
     
    nazdrovia.admin, May 23, 2009 IP