Tracking account usage
Tracking your call usage is important if you handle a lot of calls or if you have a site that has multiple users.
My website, theinterviewr.com, looks through hundreds of calls being made each week; this call usage tracking helps me know which users are making which calls so that I can see who's heavily using the network and who is not.
This also helps me analyze things and make sure I'm actually charging users reasonably per call.
Getting ready
The complete source code for this recipe can be found in the Chapter2/Recipe1
folder in the code bundle available at www.packtpub.com/support.
How to do it...
We're going to build a usage tracking system now to let us look at how our Twilio account is being used. Perform the following steps to do so:
Download the Twilio Helper Library from https://github.com/twilio/twilio-php/zipball/master and unzip it.
Upload the
Services/
folder to your website.Upload
config.php
to your website and make sure the following variables are set:<...