Php api

The php api not delivering all the information everytime for live visitors, it there a javascript, php hybrid that works better?

See all the documentation of PHP api (you can supply all other information via the set* functions) Tracking API - Analytics Platform - Matomo

That is not really what i am looking for, the php api is not always getting the browser, country, or ip.

Most of the time it is working but some of the time it is not.