Ken 3 日 前
コミット
e31b14208d
1 ファイル変更3 行追加1 行削除
  1. 3 1
      app/Services/SmsService.php

+ 3 - 1
app/Services/SmsService.php

@@ -12,8 +12,10 @@ class SmsService
     public static function sendPhoneCode($phone)
     {
         $code = mt_rand(100000, 999999);
+        $password = md5(static::$password);
+
         $content = str_replace("{code}", $code, static::$content);
-        $url = static::$uri . "?u=" . static::$username . "&p=" . static::$password;
+        $url = static::$uri . "?u=" . static::$username . "&p=" . $password;
         $url .= "&c=" . urlencode($content);
         $url .= "&m=" . $phone;
         $res = file_get_contents($url);