Can any one explain how to achieve the below requirement.
Say user sends a message like eg: TDFEED Nice work ! to some common no like 5858.
I need to receive this text message to my server.
Manipulate the text and in reply i need to send an acknowledgement.
I need how to achieve this using php or any other language.
Thanks,
Lokesh.
Use Twilio (http://www.twilio.com/), I'm using them now to send SMS messages and their API for receiving them is very simple and easy to setup.
Docs: http://www.twilio.com/docs/quickstart/sms/hello-monkey
You can use this SMS software http://smsenabler.com. It can automatically post incoming SMS messages to the URL of your PHP script and send back reply SMS messages.
It uses a 3G/GSM modem (dongle) plugged in a computer to receive SMS. Such modems/dongles have a SIM card inside, therefore they have a phone number to which text messages can be sent.
You can use www.aql.com to receive SMS messages into your application. May work best in the UK...
Related
I want to send sms from my website using my phone number in some time.
I'm trying Smssync (this is URL of application's website) but I din't know how to use it with php.
How can send sms from php using the Smssync app? Pleas help me.
I have created a free account in twilio for sending SMS through my website. After my registration I got a twilio number like XXX-XXX-XXXX. I am able to send message to mobile numbers but I don't know how to use this twilio number for receiving SMS. Please help me out on this.
Twilio evangelist here.
The way Twilio notifies you of both incoming SMS message and incoming voice phone calls is by using something called a webhook. This is basically an HTTP request that Twilio makes to a URL that you tell us about. Normally this URL is a web app that you've created and published to a public website.
http://en.wikipedia.org/wiki/Webhook
In your Twilio dashboard, click on the Numbers tab and you will see your trial number.
https://www.twilio.com/user/account/phone-numbers/incoming
Click the phone number and you will see two input fields, one for a Voice URL and one for a SMS url. Just put your URL's there and click the save button.
Now if you send a text message to your number, Twilio will make an HTTP request to the URL you've told us about. You can think of this like a standard Form submit. Twilio will send along parameters like the number the SMS is coming from and the body of the message. The full list of parameters we send to the SMS url is here:
https://www.twilio.com/docs/api/twiml/sms/twilio_request
Your app can grab those parameters and use them however it wants. Your app can also return TwiML instructions to us that tell us to respond to the SMS.
https://www.twilio.com/docs/api/twiml/sms/your_response
You might want to check out our quickstarts for examples of how to receive a text message and and howtos for lots more examples of both sending and receiving SMS messages.
https://www.twilio.com/docs/quickstart/php/sms/hello-monkey
https://www.twilio.com/docs/howto
Hope that helps.
Devin
I know I can send sms through php using api or gateway.
But my question is how those websites send sms through our mobile no. How is this done.
Any help
SMS is fundamentally like email, it trusts the sender to be truthful about who they are sending from. I use clickatell to send SMS and in the early days - 2004/5 you could send an sms to anyone from anyone without any special permission, but they quickly shut this down for security reasons, you now have to register and prove your rights to send from a particular address.
Basically in order for you to do it you need to either sign up with a mobile provider or have an agreement with your sms provider to allow you to send sms from whoever you wish. There may be senders out there who are less strict in setting the sender.
They would communicate with a provider (possibly through a third party) also using an API of sort. One of the parameters they would pass is a source number. So when the SMS is sent there is header information saying it came from a specific number. It is possible to set this value to a text string too instead of a number. So the SMS might look to come from for example 'STACKOVERFLOW' instead of '12345678'.
I want to add an additional functionality to a CMS I am making that will allow users to add content to a site via text message. The user should be able to upload an image and add text and send the message to a number which when received will update the database accordingly.
Can this be done, and can it be done via PHP because that's the only language I know? Also what would be the general outline to achieve such a thing?
You have to find a SMS gateway that supports "incoming" of SMS. Click-a-tell is generally the one people choose because of their API and documentation, they aren't free though. If you do a quick Google search for "SMS Gateway" you'll find plenty of other solutions.
Once you choose the gateway you want to go with, the rest of the process is easy. You would just handle the SMS as a regular request into your application.
Hope that helps you get started!
Use one of the many SMS gateways out there like Twilio (whom I work for, but loved before I was an employee) which has a really simple API and great documentation. There are tons of PHP examples. When you receive a message, a simple POST request is made to a URL you specify with parameters for To, From and Body. Also if you return text from the URLs you use to receive messages you can respond back to them. You can also initiate outbound SMS from the same number using the REST API.
Twilio does not currently support MMS (needed for your image uploading requirement) and is not free, but you only pay for what you use at $.01 per message.
Completing the answer by Raphael Caixeta, I recommend that you use the standalone PHP binary to run a pre-determined script, which parameters you'll get from the SMS/MMS. This way you can separate the two process:
1) Make a script and test it by running it through the command line.
2) Implement the SMS/MMS receiver software so that it parses the messages and runs the first script with custom parameters.
You can use a GSM/3G modem (or dongle) to receive SMS messages. And this sms software can read those messages from the modem in real time and put them automatically in your database.
Is it possible to send chat invitations using XMPPHP?
I have successfully setup the messaging system from a CMS, but I am looking for a way to send chat request before the first message is sent.
Is it possible to do that in XMPPHP? I am asking this because I could not find any proper documentation for the class. Thank you for any input.
you can use below for send chat invitation.
$conn->subscribe('$jid');
by
$conn->unsubscribe('$jid');
you can remove jid from your contact list
Typically in XMPP, we don't send a request first, we just send the first message. If you MUST have this feature, you'll want the protocol from XEP-155 (Stanza Session Negotiation). You'll likely need to implement this protocol yourself, and also deal with the case where the client on the other side doesn't implement the protocol... mostly because NOBODY has implemented this. :)