PHP - Readport issues

Ok, but in which point I've to put the sleep in my php and delay in arduino code for syncronize everyhting ?

Thanks
Andrea