As part of the registration for my Drupal 7 site I require the user to enter a valid phone number. Rather than doing only simple validation, I use the Numverify.com API to verify the format of the number on a per country basis and obtain extra information. This is done via a curl request which returns a json object.
The other day the API was unreachable for several hours and due to my lack of foresight, users were unable to register until I circumvented the API request.
To prevent this in the future, I need to be able to properly handle error codes such as 408. Would anybody be able to tell me how I can replicate a timeout request, locally or otherwise, for testing purposes please?