PHP code example of hsvisus / sms

1. Go to this page and download the library: Download hsvisus/sms library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hsvisus / sms example snippets


    /**
     * 发送通知短信
     * @param string $phone
     * @param array $code
     * @param string $templ
     * @param string $content
     * @return bool
     */
    public function inform(string $phone, array $code, string $templ, string $content='')
   /**
     * 发送验证码
     * @param string $phone
     * @param string $content
     * @return bool
     * @throws \Overtrue\EasySms\Exceptions\InvalidArgumentException
     */
    public function code(string $phone, string $content='')
     /**
     * 检验证码
     * @param string $phone
     * @param string $code
     * @return bool
     */
    public function verify(string $phone, string $code)