23 function ehiwebSend( $testo, $to, $user = NULL, $pasw = NULL, $from = NULL, $id_api = NULL, $url =
'https://secure.apisms.it/http/send_sms' ) {
29 if( is_array( $to ) ) {
32 foreach( $to as $ds ) {
33 $rs =
ehiwebSend( $testo, $ds, $user, $pasw, $from, $id_api, $url );
40 if( is_array( $from ) ) {
41 $sender = array_shift( array_keys( $from ) );
42 $from = array_shift( $from );
46 $to = str_replace(
'+', NULL, $to );
47 $to = str_replace(
'.', NULL, $to );
48 $to = str_replace(
'/', NULL, $to );
49 $to = str_replace(
' ', NULL, $to );
50 $to = ltrim( $to,
'0' );
53 if( substr( $to, 0, 2 ) !=
'39' ) { $to =
'39' . $to; }
56 # $testo = filter_var( $testo, FILTER_SANITIZE_FULL_SPECIAL_CHARS ); 57 $testo = iconv(
'UTF-8',
'ASCII//TRANSLIT//IGNORE', $testo);
60 logWrite(
'invio a ' . $to .
' da ' . $from .
': ' . $testo,
'ehiweb', LOG_DEBUG );
68 'authpasswd' => $pasw,
69 'body' => base64_encode( $testo ),
72 'sender' => base64_encode( $from )
74 'multipart/form-data',
84 if( substr(
$result, 0, 1 ) ==
'+' ) {
logWrite( $m, $f='site', $l=LOG_NOTICE, $d=DIRECTORY_LOG, $t=CURRENT_LOG_LEVEL, $s=SITE_STATUS)
scrive un messaggio nei log del sito