This is my codes and I got an error:
require_once(IPT_DIR."config.php");
if ($trackip == 1) {
$ipaddr = $_SERVER["REMOTE_ADDR"] ;
$hostnm = gethostbyaddr("$ipaddr");
$exclude_me=false;
array_walk($exclude_ips, 'exclude_ip');
if(!$exclude_me) array_walk($exclude_hosts, 'exclude_host');
if (!$exclude_me) {
# concatenate SCRIPT_NAME and QUERY_STRING since REQUEST_URI not used in Windows hosted sites.
# $pg = getenv(REQUEST_URI);
# $pg = getenv(SCRIPT_NAME);
$pg = $_SERVER["SCRIPT_NAME"];
# if ((getenv(QUERY_STRING)) != "") { $pg = $pg . "?" . getenv(QUERY_STRING) ; }
if (($_SERVER["QUERY_STRING"]) != "") { $pg = $pg . "?" . $_SERVER["QUERY_STRING"] ; }
}
And the config.php file:
$trackip = 1;
$exclude_ips = array(); # quoted IP comma separated list, wildcards ok
# example: $exclude_ips = array('127.0.0.1', '68.69.+');
$exclude_hosts = array(); # quoted Hostname comma separated list, wildcards ok
# example: $exclude_hosts = array('swbcs007.sbc.com', '.+avantgo.com');
And when I run this script I get this error:
Warning: array_walk() [function.array-walk]: The argument should be an array in tracking.php on line 80
Warning: array_walk() [function.array-walk]: The argument should be an array in tracking.php on line 81
Do you know why it’s happening?