I have a virtual number in nexmo 447775*****, then my goal is If someone texted me on that number the message will be forwarded to my personal number 55699*****. I read the documentation on how webhook works but I didn't quite sure if that is what I'm looking for. I already search google for a day to search for a tutorial but I didn't find any. Can someone provide me some reference or provide an example? Btw I'm using php.
You could setup your Nexmo virtual to "forward" to your personal number however you need to code your backed as such. Nexmo provides an API to facilitate sending/receiving SMS but it's not a forwarding service. Google Voice would be what you are looking if you want something out of the box. A Webhook is basically a URL that Nexmo would call when you receive an incoming SMS message. Your API/service would receive the message, parse it and do something with it. Hope this helps.
Related
I want to create a calling between driver and rider using anonymous phone no. both are not see own no. it actually see the Twilio assign no. how can i integrate in custom PHP and please also tell me the work flow. if u have code must share your git link.
I will try using twilio sdk but still not working.i am not getting what we do from PHP side.
Twilio developer evangelist here.
I'd first start by working through this tutorial we have on masked phone numbers with PHP. This doesn't give you the Android app side of things, but will teach you about how number masking works.
Then, check out the documentation for Twilio Programmable Voice for Android and try to build the quickstart application.
Once you have those two parts, you should be able to fit them together to complete your solution. If you have any trouble with those bits, then please do post on StackOverflow with your code and the feature you are having difficulty with.
What I am trying to accomplish is quite simple. I want to store all received SMS messages from a Twilio number in a database. Upon checking Twilio's documentation, their TwiML word should be able to do this, but no attribute relates to this:
https://www.twilio.com/docs/api/twiml/sms
Twilio developer evangelist here.
When your Twilio number gets sent an SMS, your application receives a webhook at the URL you supply in the settings for the number. For each messages, the webhook sends a number of parameters telling you about the message. The documentation for that can be found here: https://www.twilio.com/docs/api/twiml/sms/twilio_request.
You might want to take a look at our PHP Quickstart tutorial which will give you a good idea of how to get the details from the request. You will then just have to pick which attributes you want to store in your database.
Let me know if this helps.
I've been trying to build an app that forwards an sms to a URL
with twilio, i.e, a user sends an sms to a twilio number, the sms gets forwarded to a specified url, can't seems to find the resource on that, any experienced person in that area
to give a hint, plus what is the format of the sms forwarded to the url.
Thanks
Twilio evangelist here.
I'd suggest working through the SMS and MMS Messages Quickstart. It will walk you through the PHP needed to receive a text message:
https://www.twilio.com/docs/quickstart/php/sms
Hope that helps.
At last, I was able to find what I was looking for. Phew!
$_REQUEST['Body'] retrieves the body of the sms message and I can do whatever I like with that.
Twilio rocks!
I've been searching for a few hours on the best way to add sms notifications and reception to my PHP website. It seems that it's easy to send texts (to an email forward to a phone), but hard to receive them without an SMS gateway. Clickatell was recommended a lot.
But: I stumbled across a few article recommending Google Voice as a channel to send and receive SMS. (Here's one post: http://sudocode.net/article/190/receiving-incoming-smstext-messages-from-google-voice-in-php/)
Is there any reason I shouldn't/can't use a Google Voice number (and PHP) to handle my sms outbound and inbound messages?
I would check the Google Voice terms of service. If this is a commercial venture, I believe that's prohibited. Also since there is no official API, things could change at any time and break your app.
If you need reliable incoming or outgoing SMS there is no substitute for a gateway. I would recommend one, but I am not an impartial observer (see profile).
There is no official PHP API for Google Voice, however I used GVmax along with this PHP-SDK to create a website called Memebro.
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.