<?php function dosmsend($number,$message,$flash = "") { // your aqsms username and password $username = "yourusername"; $password = "yourpassword"; $weburl = "http://www.sms2email.com/sms/postmsg.php"; // encodes your message for sending on the web $message = urlencode($message); // the request string $smsurl = "$weburl?username=$username&password=$password&to_num=$number&message=$message"; // if $flash is set to 1, it will add the flash request onto the query if ($flash == "1") { $smsurl .= "&flash=1"; } else { } // connects to server to send message if ($content_array = file($smsurl)) { $content = implode("", $content_array); // check for response if (eregi("AQSMS-AUTHERROR",$content)) { echo "There was an authenication error"; } elseif (eregi("AQSMS-NOMSG",$content)) { echo "There was no message or mobile number"; } elseif (eregi("AQSMS-OK",$content)) { echo "The Message was queued succcessfully"; } elseif (eregi("AQSMS-NOCREDIT",$content)) { echo "Your account has no credit"; } } else { echo "There was an error connecting to the server"; } } dosmsend("07778123456","this is a test message"); // or even // dosmsend("07778123456","this is a test flash message oo!","1"); ?>