user170579
user170579

Reputation: 8530

Sending and SMS from your computer

There is a ton of data on this subject where you simply take the [email protected] and send a message, that is not what I am looking to do.

I want to send an SMS, from the command line, in this case, using php, but I would be happy to use bash, and will probably make it into an app or plug in for Safari eventually. Right now, a test case would suit me fine.

I would like to do something like this: ./sms 619-555-1212 "this is the message"

I don't need to receive the message back to the computer, this is a sending only agent.

The criteria that makes all the data I find on this not work, is that I want my correct from: number to show up. I have tried using the email gateway method and changing he from: headers, but it appears they are stripped at the gateway.

I don't mind paying a service to give me certain amount of SMS credits to make this happen. I want to avoid any hardware, where I would have to get a modem or otherwise to connect to my computer.

If I do use a service, something with an example of how to do so within their API would greatly appreciated. I feel this should take me no more than 15 minutes, but I am hours into research and not getting very far with all the little scripts out there that do nothing close to what I want to do.

Thank you very much and sorry that I don't understand this protocol to the best of my ability.

Upvotes: 1

Views: 1913

Answers (3)

John Sheehan
John Sheehan

Reputation: 78104

You can send with Twilio using cURL very easily since sending SMS is a simple POST request with three parameters. Here's an example of a bash script that makes calls but could be modified to use the SMS API instead. http://labs.twilio.com/bash/

(I work at Twilio)

Upvotes: 1

Nitesh
Nitesh

Reputation: 712

You can use any gateway that charges you a few cents for every message sent. They have a simple REST API which requires a very little coding. They even provide you a sample example to get started.

Upvotes: 0

RolandasR
RolandasR

Reputation: 3047

you will need sms gateway like http://www.clickatell.com/ for that

Upvotes: 0

Related Questions