/ Published in: PHP
                    
                                        
Simple script to send SMS throught our HTTP API (Afilnet) with PHP. Steps:
1.- Register in Afilnet. http://www.afilnet.com/anunciante/registrar.php
2.- Login and get credits (10 free) to send SMS
3.- Use this script or html form example include in this download link: http://www.afilnet.com/programacion/sms/PHP/HTTP/examples/send-simple-sms.zip
                1.- Register in Afilnet. http://www.afilnet.com/anunciante/registrar.php
2.- Login and get credits (10 free) to send SMS
3.- Use this script or html form example include in this download link: http://www.afilnet.com/programacion/sms/PHP/HTTP/examples/send-simple-sms.zip
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<?
// Register in http://www.afilnet.com/anunciante/registrar.php
// Login and get credits (10 free)
// Use this script or form include in download link:
// http://www.afilnet.com/programacion/sms/PHP/HTTP/examples/send-simple-sms.zip
$email = "EMAIL"; // Afilnet's email
$pass = "PASS"; // Afilnet's password
$mobile = "DESTINATION"; // mobile target
$idsender = "SENDER"; // sender, 11 characters max
$prefix = "PREFIX"; // country prefix
$sms = "This is a test of sms sending"; // sms text
# http request
if($response) {
switch($response) {
case "OK":
echo "SMS sent successfully";
break;
case "-1":
echo "Error in login, email or password is wrong";
break;
default:
echo "You have no credits";
}
} else {
echo "Error in request";
}
?>
URL: http://www.afilnet.com/programacion/sms/PHP/HTTP/examples/sendsimplesmsform.php
Comments
 Subscribe to comments
                    Subscribe to comments
                
                