Answer 1: This is a pretty nice sms API: http://www.clockworksms.com/
Answer 2:
This isn't an API solution, but more of an overview how you can quite easily build your own solution with PHP5. To send an sms to a phone, all you have to do is email the message to the phone number. The email address is just the phone number and carrier domain.
- Determine Carrier
- Determine domain for carrier
- Construct email address
- Send email
Determine Carrier
The carrier can be determined by the area code and first 3 numbers. I don't know any APIs off the top of my head (I'm sure they exists though), but if you wanted to go the custom route you can sort of build your own. For example, this site has an input where you can determine carreir: http://www.telcodata.us/search-area-code-exchange-detail
But it's just posting the data, so you can figure it out by passing your own parameters. for example: ww.telcodata.us/search-area-code-exchange-detail?npa=323&exchange=249
Determine Domain
Each carrier has their own domain for text. For example, AT&T is @txt.att.net while Verizon is @vtext.com.
Here is a list of carrier domains: http://www.emailtextmessages.com/
Construct Email
Example: if an AT&T number is (510) 123-4567 you can send an sms to the number by emailing [email protected].