Custom script for page visitors statistics

Hi,

I have custom made php web application. I want to implement Web analytic in web pages.

I have profile pages of users where other users visits same like linkedin.

I have show statistics on users dashboard on following

[1]. No of visitor [2]. Visit length [3]. Visitors by Country [4]. Page Views etc.

I do not want to integrate my custom php application with piwik,open web analytic and Clicky.

I am looking for any php or js or open source script which will provide me above information.

-Thanks