Results 1 to 3 of 3
  1. #1
    Kavit Gamot is offline Member
    Join Date
    Jan 2009
    Location
    India,Gujarat - Ahmedabad
    Posts
    5
    Rep Power
    0

    Default sms gateway with code

    hi Peppem
    actualy i am working with the application of sending message.

    Message application have some options like write message, inbox, sent message etc.

    i want to connect sms gateway when i write message and click send button.

    its a web application and i am using this sms gateway code into servlet.

    i am using following code....

    {code}

    var NowSMSServerAddress =
    var NowSMSUserName = "test";
    var NowSMSPassword = "test";

    function HTTPGET(strURL)
    {
    var strResult;

    try
    {
    // Create the WinHTTPRequest ActiveX Object.
    var WinHttpReq = new ActiveXObject("Msxml2.XMLHTTP" /* or "WinHttp.WinHttpRequest.5 "*/);

    // Create an HTTP request.
    var temp = WinHttpReq.Open("GET", strURL, false);

    // Send the HTTP request.
    WinHttpReq.Send();

    // Retrieve the response text.
    strResult = WinHttpReq.ResponseText;
    }
    catch (objError)
    {
    strResult = objError + "\n"
    strResult += "WinHTTP returned error: " + (objError.number & 0xFFFF).toString() + "\n\n";
    strResult += objError.description;
    }

    // Return the response text.
    return strResult;
    }

    var strRequest;

    if (WScript.Arguments.Count() < 2)
    {
    WScript.Echo ("Usage: " + WScript.ScriptName + " PhoneNumber1[,PhoneNumber2,...] NowSMSURLParameter1=Value1 [NowSMSURLParameter2=Value2] NowSMSURLParameterN=ValueN]\r\n");
    WScript.Quit();
    }

    strRequest = NowSMSServerAddress + "/?PhoneNumber=" + encodeURIComponent (WScript.Arguments(0)) + "&User=" + encodeURIComponent(NowSMSUserName) + "&password=" + encodeURIComponent(NowSMSPassword) ;

    for (i=1; i<WScript.Arguments.Count(); i++)
    {
    var strTemp = WScript.Arguments(i);

    while (strTemp.indexOf("^") >= 0)
    {
    var temp = strTemp.indexOf("^");
    if (temp >= 0) {
    strTemp = strTemp.substr(0, temp) + strTemp.substr(temp+1);
    }
    }

    var equPos = strTemp.indexOf("=");
    if (equPos >= 0)
    {
    strRequest += "&";
    strRequest += strTemp.substr(0,equPos+1);
    strRequest += encodeURIComponent(strTemp.substr(equPos+1));
    }
    else
    {
    strRequest += "%20";
    strRequest += encodeURIComponent(strTemp);
    }

    }


    /* WScript.Echo(strRequest); */

    WScript.Echo(HTTPGET(strRequest));

    {code}

    this script is not working and error is not displaying.
    i have add sms server address bt here i cant shoewthat because its display as link.
    so i removed it.

    please give some idea.
    Last edited by Kavit Gamot; 01-28-2009 at 06:28 AM.

  2. #2
    maxh69 is offline Member
    Join Date
    Oct 2012
    Posts
    1
    Rep Power
    0

    Default Re: sms gateway with code

    Hi,
    Which gateway are you using? I use Ozeki NG SMS Gateway, and I find it reliable and versatile, and it provides the high capacity that I need. When I had any problems, I just wrote them an e-mail, to which I always got a quick and helpful response, so my company can always run smoothly with this gateway. Their website might provide more useful information for you: [Moderator edit: Link removed] . That's all I could say, but I hope I could help you.
    Max
    Last edited by DarrylBurke; 10-17-2012 at 11:54 AM. Reason: Removed spammy link

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,009
    Rep Power
    20

    Default Re: sms gateway with code

    I think after three and a half years they might have found a solution.

    Locking this thread.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Sms Gateway
    By Kavit Gamot in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 11-06-2009, 03:24 AM
  2. Sms GateWay
    By Kavit Gamot in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 01-27-2009, 10:00 AM
  3. Gateway 4.6.1
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 03-14-2008, 06:12 PM
  4. Untangle Gateway Platform 5.0.3
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 11-09-2007, 10:34 PM
  5. Gateway 3.0_beta2
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-17-2007, 05:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •