Note that you’ll need to set a webhook on each project that you want to monitor; there’s no way to set a webhook for tasks on anything higher than the project level.
Definitely recommend that you use the official Asana PHP library.
Here’s some code:
@Bastien_Siebman is one of the resident PHP gurus here and can probably help you with other questions.