You need PHP (i.e., a server-side part) only if you want to prevent people from restarting the timer by reloading the page. Or if you would like the timer to run over multiple pages.
In every other case, you can use this simple JavaScript (on each page) to virtually hit the "next" button after 20 seconds:
windows.setTimeout(SoSciTools.submitPage, 20000);