This article illustrates the functions of Yii using the Smsto SMS interface. Share to everyone for your reference, specific as follows:
Public Function Smsto ($telphone, $message)
{
//SMS Interface user name $uid, if not or cannot send please contact customer service
$uid = ' zyd ';
SMS Interface password $passwd
$passwd = ' 123456 ';
The target cell phone number sent to $telphone
$telphone = $telphone;//change to your mobile number
//SMS content $message
$message = $message;
$message 1 =urlencode (mb_convert_encoding ($message, ' utf-8 ', ' gb2312 '));
$gateway = "Http://sms.zyd.com/msgsend.ashx?" username={$uid}&password={$passwd}&mobile={$telphone}&content={$message 1}&seq=1000 "; interface, please modify
$result = file_get_contents ($gateway);
return $result;
}
More about Yii related content readers can view the site topics: "PHP micro-credit Development Skills Summary", "Yii framework Introduction and common skills Summary", "PHP Excellent Development Framework Summary", "Smarty Template Primer Tutorial", "PHP object-oriented Programming Program", " Summary of PHP string usage, Introduction to PHP+MYSQL database operations, and a summary of PHP common database operations Tips
I hope this article will help you with the PHP program design based on the YII framework.