Yii function demo using the smsto SMS interface, yiismsto
This example describes the functions of Yii that use the smsto SMS interface. We will share this with you for your reference. The details are as follows:
Public function smsto ($ telphone, $ message) {// User Name of the SMS interface $ uid. If there is no or cannot be sent, contact Customer Service $ uid = 'zyd '; // SMS Interface Password $ passwd = '000000'; // sent to the target mobile phone number $ telphone = $ telphone; // change your mobile phone number here // The text message content $ message = $ message; $ message1 = urlencode (mb_convert_encoding ($ message, 'utf-8 ', 'gb2312'); $ gateway = "http://sms.zyd.com/msgsend.ashx? USERNAME = {$ uid} & PASSWORD = {$ passwd} & MOBILE = {$ telphone} & CONTENT = {$ message1} & SEQ = 1000 "; // interface, modify $ result = file_get_contents ($ gateway); return $ result ;}