Official Site

click here to view our new site launched

Pages

Tuesday, January 3, 2012

Make use of SMS API's

Just we need to have the account in one of the following sms provider.
  1. Way2sms : 140 Chars
  2. Full On SMS : 160 Chars
  3. SMS India : 160 Chars
  4. Whozzat : 470 Chars
  5. SMS Inside : 160 Chars.
  6. Site 2 SMS : 260 Chars.
  7. SMSFI.com : 138 Chars.
WAY2SMS API:
Today I am going to explain how to use my WAY2SMS API service in your own application.
http://ubaid.tk/sms/sms.aspx?uid=” + uid + “&pwd=” + password + “&msg=” + message + “&phone=” + no + “&provider=way2sms”

Your can use cURL for PHP

C# CODE:
The Source Code example given below is in C# and can be used in any .NET Application directly.

public void send(string uid, string password, string message, string no)
{
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(“http://ubaid.tk/sms/sms.aspx?uid=” + uid + “&pwd=” + password + “&msg=” + message + “&phone=” + no + “&provider=way2sms”);
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString = respStreamReader.ReadToEnd();
respStreamReader.Close();
myResp.Close();
}

NOTE : Don't forget to use namespaces
using System.Net;
using System.IO;



NOTE:

Required Parameters : uid, pwd, phone, msg.
uid : your userid for the required sms provider
pwd : your password for the required sms provider
provider : way2sms(default), fullonsms, smsindia, whozzat, smsinside, site2sms. if you do not specify any provider, way2sms will be used by default.
phone : phone number whom you want to send sms. seperate multiple phone numbers with a comma (,)
msg : your sms message, unlimited chars. will be sent as multiple msgs if crosses the message length for any provider
codes : 1. completely optional parameter. send this if you require a user friendly msg from the server.
for example, if codes=1 is not provided the server will return the result as an integer.
Output Flags:
1 means SMS sent,
-1 means some server error,
-2 means invalid username,
-3 means invalid message text,
-4 means login failed.
Currently, the following service providers are supported


4 comments:

  1. set provider=fullonsms in the url

    ReplyDelete
  2. hey prabhu thanx for this amaizing help..

    i want to implement codes..i.e to check whether that message has been sent or any server error etc etc...

    how do i implement it???

    plzz help...

    thanx in advance.

    ReplyDelete
    Replies
    1. Output Flags:
      1 means SMS sent,
      -1 means some server error,
      -2 means invalid username,
      -3 means invalid message text,
      -4 means login failed.

      Delete
    2. Hey buddy, now you ca also follow my another good site @ Facebook: http://www.facebook.com/Sync4Brain
      Twitter: https://twitter.com/sync4brain
      Website : http://www.Sync4Brain.com/

      Delete

$2.49 .COM at GoDaddy.com! Expires 5/14/13