PHP Send SMS Instance Code _php Tutorial

Source: Internet
Author: User


<title>SMS Web Sender Demo</title>


SMS Web Sender demo!

if ($action! = "Submit") {
?>

Any username or password your Enter here is not being stored
In any (although we ' re not using SSL either)

Also, as can see the most of these is UK sites, not all
Of them would support international numbers!

} else {

Contains the site details
Include ("sites.php");

Contains main class
Include ("class.sms_web_sender.php");

if (Empty ($number) | | empty ($site) | | empty ($message)) {
Die ("Make sure number, site and message is not empty");
}

if (!empty ($debug) && $debug = = "Yes") {
$debug = true;
} else {
$debug = false;
}

Signature bit of text that ' s required by some
Sites like mtnsms.com, can leave as is
$signature = "*";

Create instance of SMS Web sender the One
Optional argument would determine if
Debug is turned on or not
$sms = new Sms_web_sender ($debug);

Add accounts
1st Argument:username
2nd Argument:password
3rd Argument:server
4th Argument:weight (This was only useful when
Shuffling the logins, the higher
The weight, the more likely it ' ll
Being placed near the top of the list)
Default if left Blank:1
$sms->add_login ("$user", "$pass", "$site");

Add Proxy Server Details if required
I Haven ' t tested this myself, feature of Jm_sms
$sms->setproxyserver ("ProxyServer");
$sms->setproxyport (81);
$sms->setproxyuser ("Proxyusername");
$sms->setproxypass ("Proxypassword");
$sms->setproxy (TRUE);

Passes the number, signature and message in an array
$result = $sms->send_sms ("number" + $number, "signature" = = $signature, "message" = $message));

if ($result) {
echo "

sent!

";
} else {
echo "

Could Not Send:(

";
echo "

Go back

";
}

}

?>



http://www.bkjia.com/PHPjc/445003.html www.bkjia.com true http://www.bkjia.com/PHPjc/445003.html techarticle HTML head titlesms Web Sender demo/title meta http-equiv=content-type content=text/html; charset=iso-8859-1/head bod Y bgcolor= #FFFFFF text= #000000 h2sms Web Sender demo!/h2? php I ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.