Rate Limiting SOAP client in PHP

I’ve recently had the requirement to rate limit SOAP calls to a remote API, so having done the work I though I’d document it here.

I’ve left in one method in the code below which is specific to my use – SearchAccounts(). The reason for this is that I though I’d show how I go about using it, in that I don’t leave calls up to the magical methods that the SoapClient itself provides, but rather re-define the functions in my own class so that I can generate API docs locally. It is of course up to you if you want to use this method.

2 thoughts on “Rate Limiting SOAP client in PHP”

  1. indeed it does – i programmed it for a batch job run from the CLI. You could move the rate limiting into shared memory, but I imagine if you’re doing lots of SOAP requests for a single web request, you need to look at the issue from a different angle.

Leave a Reply

Your email address will not be published. Required fields are marked *