Skip to content

Commit

Permalink
Merge pull request #16 from zAlwaysTheSun/patch-1
Browse files Browse the repository at this point in the history
Update Clickatell
  • Loading branch information
luke- authored Feb 6, 2023
2 parents 73c78a9 + ac89fbf commit 7156d9f
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions components/Clickatell.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ class Clickatell
{

public $baseUrl;
public $api_id;
public $user_id;
public $pass;
public $apiKey;

function __construct()
{
$this->baseUrl = "http://api.clickatell.com/http/sendmsg";
$this->api_id = Setting::Get('apiid_clickatell', 'sms');
$this->user_id = Setting::Get('username_clickatell', 'sms');
$this->pass = Setting::Get('password_clickatell', 'sms');
$this->baseUrl = "https://platform.clickatell.com/messages/http/send";
$this->apiKey = Setting::Get('apiKey_clickatell', 'sms');
}

/**
Expand Down Expand Up @@ -94,16 +90,13 @@ private function generateUrl($sender, $receiver, $msg)

$url = ($this->baseUrl) . "?";
$url .= http_build_query(array(
'api_id' => $this->api_id,
'user' => $this->user_id,
'pass' => $this->pass,
'apiKey' => $this->apiKey,
'to' => $receiver,
'text' => $msg,
'from' => $sender,
'content' => $msg,
));
return $url;
}

}

?>
?>

0 comments on commit 7156d9f

Please sign in to comment.