MMS Send confirmation | Search |
NowSMS Support Forums ⬆ MMS & SMS Technical Discussions (unsupported) ⬆ Archive through August 08, 2004 ⬆ |
◄ ► |
Author | Message | |||
Neven Pecanac New member Username: Neven Post Number: 1 Registered: 08-2004 |
Hy, i'm trying to get a valid send confirmation response on mobile phone, but it keeps saying "Defected MMS" upon sending it (SL55). Can you tell me what I'm doing wrong? (my PHP source for response is): function myoutput() { global $file; $pos = 0; $confirm[$pos++] = 0x8C; // message-type $confirm[$pos++] = 0x81; // m-send-conf $confirm[$pos++] = 0x98; // transaction-id for ($i = 0; $i < strlen($this->TRANSACTIONID); $i++) { //checking if first character is between 128-255 and put quote <"> if it is if($i==0) if(ord($this->TRANSACTIONID[0])<255 && ord($this->TRANSACTIONID[0])>128) { $confirm[$i+$pos]=0x22; continue; } $confirm[$i+$pos] = ord(substr($this->TRANSACTIONID, $i, 1)); } $pos += $i; $confirm[$pos++] = 0x00; // end of string $confirm[$pos++] = 0x8D; // version $confirm[$pos++] = 0x90; // 1.0 $confirm[$pos++] = 0x92; // response-status $confirm[$pos++] = 0x80; // OK //sending response text $confirm[$pos++] = 0x93; // response-text $rtext="OK"; for ($i = 0; $i < strlen($rtext); $i++) { //checking if first character is between 128-255 and put quote <"> if it is if($i==0) if(ord($rtext[0])<255 && ord($rtext[0])>128) { $confirm[$i+$pos]=0x22; continue; } $confirm[$i+$pos] = ord($rtext[$i]); } $pos += $i; $confirm[$pos++] = 0x00; // end of string //sending message id $confirm[$pos++] = 0x8B; // message-id $rmid="2333"; for ($i = 0; $i < strlen($rmid); $i++) { //checking if first character is between 128-255 and put quote <"> if it is if($i==0) if(ord($rmid[0])<255 && ord($rmid[0])>128) { $confirm[$i+$pos]=0x22; continue; } $confirm[$i+$pos] = ord($rmid[$i]); } $pos += $i; $confirm[$pos] = 0x00; // end of string $resp=""; // respond with the m-send-conf foreach ($confirm as $byte) $resp.=chr($byte); echo $resp; } |