Support forum
Hello Douglas,
The light edition of Diafaan SMS Server can only send messages to the HTTP API of Clickatell. In the basic- and full edition of Diafaan SMS Server you can use a Scripting Gateway to add support for HTTP API's of other SMS services but this requires scripting in C# or Visual Basic.NET and some programming experience.
In the Scripting Pack on the download page of our website, you can find a script for the Scripting Gateway called 'SimpleHTTPGateway.cs'. This script can be used as a basis for a customized script. You only have to change the 'OnMessageToSend' function in the script to make it suitable for the HTTP API you use. For your example the 'OnMessageToSend' function can be changed to the following (untested) code:
string message, string messageType)
{
String URI = "http://www.painelsms.com.br/sms.php?i=66666&s=231099&funcao=enviar";
try {
// Add message text to the URI
URI += "&mensagem=" + System.Web.HttpUtility.UrlEncode(message);
// Add recipient number to the URI
URI += "&destinario=" + System.Web.HttpUtility.UrlEncode(toAddress);
// Send the web request URI to the web server with a GET request
System.Net.WebRequest req = System.Net.WebRequest.Create(URI);
System.Net.WebResponse resp = req.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(resp.GetResponseStream());
string response = sr.ReadToEnd().Trim(); //
PostSendResult(recordId, "", StatusCode.Sent, "", "", "", false);
}
catch (Exception e) {
PostSendResult(recordId, "", StatusCode.SendError, "Error: " + e.Message, "", "", false);
}
}
Regards, Henk
Most Users Ever Online: 529
Currently Online:
8 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 672
Members: 0
Moderators: 0
Admins: 1
Forum Stats:
Groups: 2
Forums: 3
Topics: 1141
Posts: 3899
Newest Members:
, Henk HelmantelAdministrators: Henk Helmantel: 1488