You can use this project as reference for a PHP traffic implementation.