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
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
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]; }
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