/** * Ricevi singolo MMS * * * @param string mmsid (Id del messaggio precedentemente ricevuto dal gagteway * MMS durante la fase di alert (fase 1) * vedere la documentazione relativa al servizio di ricezione MMS) (opzionale) * * @returns array contiene la struttura dell'MMS. * * Esempio di struttura ritornata (MMS inviato da un nokia N70) : * * * Array * ( * [phone] => +392222222 * [subject] => prova mms * [timestamp] => 2007-09-12 11:13:24 * [attachments] => Array * ( * [0] => Array * ( * [type] => image/jpeg * [filename] => 10082007.jpg * [content] = * /9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoH.... * * ) * * [1] => Array * ( * [type] => application/smil * [filename] => <1785700435> * [content] => <smil><head><layout><root-layout width="176" * height="208"/><region id="Image" width="160" height="120" top="68" * left="8" fit="meet"/><region id="Text" width="160" height="58" * top="5" left="8" fit="scroll"/></layout></head><body><par * dur="5000ms"><img region="Image" src="10082007.jpg"/><text * region="Text" src="001prova.txt"/></par></body></smil> * * ) * * [2] => Array * ( * [type] => text/plain * [filename] => 001prova.txt * [content] => 001prova invio mms * * ) * * ) * * ) * * * */ function recvMms($mmsid = "") { if ($this->checkVersion() == 4) { require_once 'lib-nusoap.inc.php'; $client = new soapclient('http://mmsgw.mobyt.it/mms-soap/?wsdl', true); $err = $client->getError(); if ($err) { trigger_error('Errore nella creazione del client SOAP: ' . $err, E_USER_ERROR); } $res = $client->call('recvMms', array($this->login, $this->pwd)); if ($client->fault) { return join(' ', $res); } else { if ($err) { trigger_error('Errore la call di recvMms: ' . $err, E_USER_ERROR); } else { return $res; } } } else { $client = new SoapClient('http://mmsgw.mobyt.it/mms-soap/?wsdl', array('login' => $this->login, 'password' => $this->pwd)); $res = $client->recvMms($this->login, $this->pwd); if (!$res) { trigger_error('Errore durante la call di recvMms: ' . $e->__toString(), E_USER_ERROR); return false; } if (is_soap_fault($res)) { trigger_error("Errore SOAP: (faultcode: {$res->faultcode}, faultstring: {$res->faultstring})", E_USER_ERROR); } else { return $res; } } }