php: snipped of code to get real time data reports.