• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Sending booking confirmation by text

Sending booking confirmation by text 9 years 10 months ago #31659

  • sam.samiei
  • sam.samiei's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 23
  • Thank you received: 1
Hi, I've got a booking form built with RSForm pro and was wondering if its possible to send a confirmation by text message. right now user gets an email confirmation and the client wants to send a sms if the user enter their mobile number.

I've signed up for clickatell.com account and used the code blow from clickatell and placed it in PHP Scripts > Script called on form process and it worked. the issue I've got is first how can i add two separate php script there?

I've got a php script for counter and this one.

$db = JFactory::getDbo();
$db->setQuery("SELECT COUNT(`SubmissionId`) FROM #__rsform_submissions WHERE FormId='".(int) $formId."'");
$_POST = $db->loadResult()+1;

and sms code

<?php
$user = "user";
$password = "password";
$api_id = "xxxxxxx";
$baseurl ="api.clickatell.com";

$text = urlencode("This is an example message");
$to = "00123456789";

// auth call
$url = "$baseurl/http/auth?user=$user&password=$password&api_id=$api_id";

// do auth call
$ret = file($url);

// explode our response. return string is on first line of the data returned
$sess = explode(":",$ret[0]);
if ($sess[0] == "OK") {

$sess_id = trim($sess[1]); // remove any whitespace
$url = "$baseurl/http/sendmsg?session_id=$sess_id&to=$to&text=$text";

// do sendmsg call
$ret = file($url);
$send = explode(":",$ret[0]);

if ($send[0] == "ID") {
echo "successnmessage ID: ". $send[1];
} else {
echo "send message failed";
}
} else {
echo "Authentication failure: ". $ret[0];
}
?>

thanks in advance for any help
Last Edit: 9 years 10 months ago by sam.samiei.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!