embed rx/tx rates

hello, i’m currently running an external web server , i embed some information into client’s web page using php api , i embedded info like their usage and current rx/tx but what what i’m looking for is how to make it live tx/rx display instead of a shot the while they open the page?