I Have a small online shopping website, i want to send my customers to the latest deals information, how can i code this system give me a example. Thanks.
Asked
Active
Viewed 173 times
-2
-
Do you have a hardware phone attached to the server or do you want to use an external service? – Daniel Alder Aug 27 '15 at 10:36
-
Need a external service – Aug 27 '15 at 11:09
-
Out of curiosity, what language are you using? – Sidharth Sharma Aug 29 '15 at 22:40
-
1thanks for the comment,Im using PHP – Aug 31 '15 at 03:01
-
No worries, feel free to check out my updated answer for sample code on sending an SMS using Nexmo's SMS API in PHP! Happy coding! – Sidharth Sharma Sep 08 '15 at 04:49
1 Answers
-1
I suggest using a SMS Gateway API, as I see you are trying to implement an external service.
Nexmo, where I work, has an SMS API that is easy to use, reliable, and provides security when reaching out to users.
You can reach users in over 200 countries with one simple HTTP call.
Here is a link to the docs for the SMS API
EDIT: I saw your comment about using PHP @Nova... look below for sample code which will allow you to send your first SMS using Nexmo's SMS API in PHP.
(You will receive an API Key & API Secret after signing up for a Nexmo trial account)
<?php
$url = 'https://rest.nexmo.com/sms/json?' . http_build_query([
'api_key' => API_KEY,
'api_secret' => API_SECRET,
'to' => YOUR_NUMBER,
'from' => NEXMO_NUMBER,
'text' => 'Hello from Nexmo'
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Sidharth Sharma
- 385
- 3
- 15