all is well so far, just little hicups... one being..
i have a .pl script that logs ip/host time and date etc...
i have changed the includes and it is functioning (ie, no 500 errors)
but it is logging the server i am being hosted on
[ Time: Tuesday May 04, 2010, 09:09:19 PM ] - [ With: PHP/5.2.12 ]
[ Host: 74.81.xx.xxx/server3r.xxxxxx.net ] [ From: ]
[ Pages: ]
when normally it will be (with the index.shtml page)
[ Time: Monday May 03, 2010, 09:30:46 PM ] - [ With: Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.0; Windows NT 5.1; Trident/4.0; GTB) ]
[ Host: 64.12.xxx.xx/cache-mtc.xxx.xxx.com ] [ From: http://search.aol.com/aol/search?s_it=wscreen-searchboxhtml&q=xxxxxxxx]
[ Pages: ]
$_SERVER['REMOTE_ADDR'];
$ENV{'REMOTE_HOST'};
i see that PHP uses the $_server var, whereas pl uses the $env
i have tried changing them around.. but to no avail...
i have:
if (!$ENV{'REMOTE_HOST'}) {my @subnet_numbers = split (/\./, $_SERVER['REMOTE_ADDR']);
$ENV{'REMOTE_HOST'} = gethostbyaddr(pack("C4", @subnet_numbers), 2) || $_SERVER['REMOTE_ADDR'];
}
$ippjrey = $_SERVER['REMOTE_ADDR'];
$hostpjrey = $ENV{'REMOTE_HOST'};
thanks for taking time to read this!
pj