Send welcome sms via API to newly registered user via signup form
-
Hello everyone.
I am using UM signup form in my site, I want welcome sms to be sent to registered user ( i am taking mobile number in form). After completing sign up process.
I have php api for from my bulk sms provider. Can anyone please help me where to put that and how to use meta tags ( mobile number, name, user id, selected user role) in sms .
Using textlocal for sms.
Api for php :
<?php
// Authorisation details.
$username = “[email protected]”;
$hash = “66ade0f0c30253145b390866621d163eccbd52181466b0205aee7ba2e6d9ea82”;// Config variables. Consult https://api.textlocal.in/docs for more info.
$test = “0”;// Data for text message. This is the text message data.
$sender = “TXTLCL”; // This is who the message appears to be from.
$numbers = “910000000000”; // A single number or a comma-seperated list of numbers
$message = “This is a test message from the PHP API script.”;
// 612 chars or less
// A single number or a comma-seperated list of numbers
$message = urlencode($message);
$data = “username=”.$username.”&hash=”.$hash.”&message=”.$message.”&sender=”.$sender.”&numbers=”.$numbers.”&test=”.$test;
$ch = curl_init(‘https://api.textlocal.in/send/?’);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); // This is the result from the API
curl_close($ch);
?>The page I need help with: [log in to see the link]
- The topic ‘Send welcome sms via API to newly registered user via signup form’ is closed to new replies.