apache logs through api

amerce

Verified User
Joined
Mar 16, 2004
Messages
8
Hi all,

When i try to read the apache logs through the api, with /CMD_SHOW_LOG, DA gives me some ugly destroyed log back. Looks like this:

PHP:
Array
(
    [81_69_152_142_-_-_] => Array
        (
            [22/Nov/2005:12:27:48  0100] => 27045
        )

    [st] => 60\" \"Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.12) Gecko/20050919 Firefox/1.0.7\"
195.70.154.50 - - [22/Nov/2005:12:30:33  0100] \"GET /stuff/ascii_walker.gif HTTP/1.1\" 200 14872 \"-\" \"Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.12) Gecko/20050919 Firefox/1.0.7\"
195.70.154.50 - - [22/Nov/2005:12:30:33  0100] \"GET /favicon.ico HTTP/1.1\" 404 - \"-\" \"Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.12) Gecko/20050919 Firefox/1.0.7\"

)

I get this result with:
PHP:
$mydata_alog100 = array(
'domain' =>'domein',
'type' => 'log',
'lines' => '5');
	$sock->query('/CMD_SHOW_LOG',$mydata_alog100);
	$result_alog100 = $sock->fetch_parsed_body();

print_r($result_alog100);

Anyone has an idea how i should do this, to get a nice error- and access log from apache?

Any help would be welcome.

Tnx in advance.

-Anthony
 
Back
Top