Revert "Revert "Revert "Update and rename Textmarketer.php to Smsit.class.php"""

This reverts commit 063bd4e430.
pull/80/head
michael@ilovecode.dk 2014-04-23 22:39:22 +02:00
parent 063bd4e430
commit b8f25384b2
1 changed files with 4 additions and 5 deletions

View File

@ -28,7 +28,7 @@
namespace psm\Txtmsg; namespace psm\Txtmsg;
class Smsit extends Core { class Textmarketer extends Core {
// ========================================================================= // =========================================================================
// [ Fields ] // [ Fields ]
// ========================================================================= // =========================================================================
@ -39,16 +39,15 @@ class Smsit extends Core {
public $successcount = 0; public $successcount = 0;
public function sendSMS($message) { public function sendSMS($message) {
// http://www.smsit.dk/api/sendSms.php?apiKey=[KEY]x&senderId=[AFSENDER]&mobile=[MOBILNUMMER]&message=[BESKED]
// Use USERNAME as API KEY, password not needed $textmarketer_url = "https://api.textmarketer.co.uk/gateway/";
$textmarketer_url = "http://www.smsit.dk/api/sendSms.php";
$textmarketer_data = urlencode( $message ); $textmarketer_data = urlencode( $message );
$textmarketer_origin = urlencode( 'SERVERALERT' ); $textmarketer_origin = urlencode( 'SERVERALERT' );
foreach( $this->recipients as $phone ){ foreach( $this->recipients as $phone ){
$URL = $textmarketer_url."?apiKey=" . $this->username . "&mobile=" . $phone . "&message=" . $textmarketer_data . "&senderId=" . $textmarketer_origin; $URL = $textmarketer_url."?username=" . $this->username . "&password=" . $this->password . "&to=" . $phone . "&message=" . $textmarketer_data . "&orig=" . $textmarketer_origin;
$result = file_get_contents( $URL ); $result = file_get_contents( $URL );