search
Homephp教程PHP开发Yii function demo example using smsto SMS interface

The example in this article describes the functions of Yii using the smsto SMS interface. Share it with everyone for your reference, the details are as follows:

public function smsto($telphone,$message)
{
    //短信接口用户名 $uid,如果没有或不能发送请与客服联系
    $uid = 'zyd';
    //短信接口密码 $passwd
    $passwd = '123456';
    //发送到的目标手机号码 $telphone
    $telphone = $telphone;//此处改成自己的手机号
    //短信内容 $message
    $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"; //接口,请自行修改
    $result = file_get_contents($gateway);
    return $result;
}

I hope this article will be helpful to everyone’s PHP program design based on the Yii framework.

For more Yii function demo examples using the smsto SMS interface, please pay attention to the PHP Chinese website for related articles!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)