|
|
||||||
Sending SMS basics using PHP class
RoutoMessaging provides you with sms gateway integration tools as ready-made scripts available to help you managing connection to our SMS gateway over your chosen programming language. These scripts as developer solution all work with the HTTP application. Join us now and get 10 SMS to test our SMS Gateway service.
Use the PHP Language code sample bellow to send sms trough RoutoMessaging SMS Gateway. Register for an HTTP API account and you will immediately receive 10 test messages to try our service.
Send SMS with PHP Language:
index.html
<html>
<body>
<form action="sendsms.php" method="post">
</body>
</html>
<body>
<form action="sendsms.php" method="post">
Number: <input type="text" name="number">
Message: <input type="text" name="message">
<input type="submit" value="Send SMS">
</form>Message: <input type="text" name="message">
<input type="submit" value="Send SMS">
</body>
</html>
sendsms.php
<?php
// include RoutoSMS class
include("RoutoTelecomSMS.php");
// creating object
$sms = new RoutoTelecomSMS;
// setting login parameters
$sms->SetUser("your_username");
$sms->SetPass("your_password");
$sms->SetOwnNum("44792838383838"); // optional
$sms->SetType("SMS"); // optional
// get values entered from FORM
$number=$_REQUEST["number"];
$message=$_REQUEST["message"];
$sms->SetNumber($number);
$sms->SetMessage($message);
// send SMS and print result
$smsresult = $sms->Send();
print $smsresult;
?>
// include RoutoSMS class
include("RoutoTelecomSMS.php");
// creating object
$sms = new RoutoTelecomSMS;
// setting login parameters
$sms->SetUser("your_username");
$sms->SetPass("your_password");
$sms->SetOwnNum("44792838383838"); // optional
$sms->SetType("SMS"); // optional
// get values entered from FORM
$number=$_REQUEST["number"];
$message=$_REQUEST["message"];
$sms->SetNumber($number);
$sms->SetMessage($message);
// send SMS and print result
$smsresult = $sms->Send();
print $smsresult;
?>
© 2010 Routo Telecommunications Ltd.
RoutoMessaging ® 2010.






