Just we need to have the account in one of the following sms provider.
- Way2sms : 140 Chars
- Full On SMS : 160 Chars
- SMS India : 160 Chars
- Whozzat : 470 Chars
- SMS Inside : 160 Chars.
- Site 2 SMS : 260 Chars.
- 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