SMSCMD Code Sample download smscmd.zip
Update password file sms4mail.txt and run
smscmd genkey to encrypt sms4mail.txt to smscmd.key.
|
VB Code Sample Usage1 : smscmd "text" "phone1,phone2"
Usage2 :
smscmd "text" "phone1,phone2" "email" "password" '***** SendSMS function Function sendsms(smstext
As String, phone As String, email as String, password as String) As
Variant smstext=Mid(smstext, 1,
155) 'Maximum to 155 character sms = """" & smstext & """
" & """" & phone & """ " & """" & email & """ " & """" & password & """" Dim Totext As String,
Email as String, Password as String Email = "mymail@gmail.com" 'your registered email
in sms4mail.com |
JAVA Code Sample |
Java Cod Sample1 - Just execute the smscmd.exe . No Catch the response
import java.io.IOException; import java.io.InputStream;
public class ExecuteDOSCommand { public static void main(String[] args) { final String dosCommand = "cmd /c c:\\smscmd\\smscmd.exe"; final String text = "YOUR SMS Message Here .........................."; final String mobile = "YOUR local mobile # here ......................."; try { final Process process = Runtime.getRuntime().exec( dosCommand + " " + text + " " + mobile); } catch (IOException e) { e.printStackTrace(); } } }
Java Cod Sample 2 - Catch the smscmd.exe response back
import java.io.IOException; import java.io.InputStream;
public class ExecuteDOSCommand { public static void main(String[] args) { final String dosCommand = "cmd /c c:\\smscmd\\smscmd.exe"; final String text = "YOUR SMS Message Here .........................."; final String mobile = "YOUR local mobile # here......................."; try { final Process process = Runtime.getRuntime().exec( dosCommand + " " + text + " " + mobile); final InputStream in = process.getInputStream(); int ch; while((ch = in.read()) != -1) { System.out.print((char)ch); } } catch (IOException e) { e.printStackTrace(); } } } |
VC++ sample |
#include "shellapi.h" VC ++ Code Sample ShellExecute(NULL,"open","c:\\smscmd\\smscmd.exe", "text mobile",NULL,SW_HIDE ); |
C# sample |
Process.Start(
"C:\\Windows\\system32\\cmd.exe", "/C C:\\smscmd\smscmd.exe
text mobile" );
|