Example #1
0
 /**
  * Cette fonction envoie un message SMS au numéro désigné
  * C'EST LA RESPONSABILITE DU PROGRAMME APPELANT DE GERER LE TEXTE DU MESSAGE (longueur, etc.)
  *
  * @param string $to Numéro destinataire, de la forme +33612345678
  * @param string $message  Texte du message
  *
  * @return int|bool Id du SMS envoyé ou False en cas d'erreur
  */
 public function Send($to, $message)
 {
     try {
         $soap = new SoapClient("https://www.ovh.com/soapi/soapi-re-1.63.wsdl");
         //telephonySmsUserSend cf  http://www.ovh.com/soapi/fr/?method=telephonySmsUserSend
         $result = $soap->telephonySmsUserSend($this->user, $this->password, $this->account, $this->from, $to, $message, "", "2", "", "", "", "", "1");
         return $result;
         // contient l'id d'envoi
     } catch (SoapFault $fault) {
         return $fault;
     }
 }