Invio sms multipli con notifica


1 <?php
2
3 // Esempio di invio multiplo con notifica
4
5
6 require('../lib-mobytsms.inc.php');
7
8 $numeri = array(
9 '1234567' => '+393201234567',
10 '1234568' => '+393471234567'
11 );
12
13 $sms = new mobytSms('C00000_001', 'password');
14 $sms->setFrom('Mittente');
15
16 $sms->setQualityAutoNotify();
17
18 $result = $sms->sendMultiSms($numeri, 'Testo del messaggio');
19
20 foreach (explode("\n", $result) as $key => $value)
21 {
22 if (substr($value, 0, 2) == 'OK')
23 {
24 echo 'Il messaggio al numero '.$numeri[$key].
25 ' è stato inviato correttamente<br>';
26 }
27 else
28 {
29 echo 'Il messaggio al numero '.$numeri[$key].
30 ' NON è stato inviato correttamente<br>';
31 }
32 }
33
34 ?>

Documentation generated on Fri, 21 Dec 2007 12:16:53 +0100 by phpDocumentor 1.2.3