My SMS provider has some code on their site .. ...
How can I add a button next to the mobile number field in leads or contacts so when I press it I can enter an SMS message and it is recorded as history (just like a call)??
The SMS code
<?php
// Authorisation details
$uname = "youremailaddress";
$pword = "yourpassword";
// Configuration variables
$info = "1";
$test = "0";
// Data for text message
$from = "Jims Autos";
$selectednums = "440000000000";
$message = "Test with an ampersand (&) and a £5 note";
$message = urlencode($message);
// Prepare data for POST request
$data = "uname=".$uname."&pword=".$pword."&message=".$mess age."&from=". $from."&selectednums=".$selectednums."&info=".$inf o."&test=".$test; // Send the POST request with cURL
$ch = curl_init('http://www.txtlocal.com/sendsmspost.php');
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 Txtlocal
curl_close($ch);
?>


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks