Skip to content

Instantly share code, notes, and snippets.

@nicolaskempf57
Created April 27, 2015 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicolaskempf57/4cfd3001f7c18a0a18fe to your computer and use it in GitHub Desktop.
Save nicolaskempf57/4cfd3001f7c18a0a18fe to your computer and use it in GitHub Desktop.
smsGateway : send sms to all contacts ( https://smsgateway.me/ )
<?php
include "smsGateway.php";
$smsGateway = new SmsGateway('ADRESSE_EMAIL', 'MOT_DE_PASSE');
$deviceID= IDENTIFIANT_DE_L_APPAREIL;
$contacts = $smsGateway->getContacts();
$arrayContacts=array();
foreach($contacts["response"]["result"]["data"] as $contact) {
$arrayContacts[]=$contact["id"];
}
$smsGateway->sendMessageToContact($arrayContacts, $message, $deviceID);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment