smsified/smsified-php — Issue #2: Incomplete HTTP headers with some versions of PHP
Author: mheadd
Created: 2011-10-26 16:13:50+00:00
State: open

Some users have reported problems when trying to send API requests to SMSified with older versions of PHP. API is responding with an HTTP 400, but the URL used in the request looks completely normal.

This might be caused by a failure to set the proper HTTP headers on the request. A work around can be used bu simply adding the appropriate headers via CURLOPT_HTTPHEADER, like so:

```php
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/x-www-form-urlencoded', 'Content-length: 0'));
```

It might be worth adding this to the PHP library, so as to make it more compatible with older version of PHP or hosts where these headers are not added automatically.