kumpel podes³a³ mi gotowy skrypt do zainstalowania, niestety - jest w nim b³±d:
Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /search/includes/ip.php on line 11
Proszê o pomoc, o to owy plik:
<?php class ClientInfo { var $flag_ext = 'png'; cfunction getctrybycode ($code) { $input = "includes/countries.dat"; { $countryCode = $pieces[0]; $countryName = $pieces[1]; $countryArray[$countryCode] = $countryName; } return $countryArray[$code]; } cfunction getctrybyhost($hostname) { return($this->getctrybycode($this->getctrycodebyhost($hostname))); } cfunction getctrycodebyhost($hostname) { } cfunction MaskOtherIP($IP) { return($IP); return($IP); } cfunction getClientIP() { return $IP; } cfunction getClientHostname() { $error = 0; $IP = $this->getClientIP(); $hostname = gethostbyaddr($IP); if (!$error) //if no error { return $hostname; } //else return ""; } cfunction getClientCountry() { $error = 0; $hostname = $this->getClientHostname(); if (!$error) { $country = $this->getctrybyhost($hostname); return $country; } //else return ""; } cfunction getClientFlag($size) { $error = 0; $hostname = $this->getClientHostname(); if (!$error) { $file_name = $this->flag_dirs[$size] . '/' . $country_code . '.' . $this->flag_ext; { return $file_name; } } //else return ""; } cfunction getClientFlagHTML($size) { $error = 0; $flag = $this->getClientFlag($size); if (!$error) { return '<img src="' . $flag . '">'; } //else return ""; } }; ?>