|
@@ -12,8 +12,10 @@ class SmsService
|
|
|
public static function sendPhoneCode($phone)
|
|
public static function sendPhoneCode($phone)
|
|
|
{
|
|
{
|
|
|
$code = mt_rand(100000, 999999);
|
|
$code = mt_rand(100000, 999999);
|
|
|
|
|
+ $password = md5(static::$password);
|
|
|
|
|
+
|
|
|
$content = str_replace("{code}", $code, static::$content);
|
|
$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 .= "&c=" . urlencode($content);
|
|
|
$url .= "&m=" . $phone;
|
|
$url .= "&m=" . $phone;
|
|
|
$res = file_get_contents($url);
|
|
$res = file_get_contents($url);
|