public function responseMsg() { //get post data, May be due to the different environments $postStr = $GLOBALS["HTTP_RAW_POST_DATA"]; logger("R ".$postStr); //extract post data if (!empty($postStr)){ $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA); $RX_TYPE = trim($postObj->MsgType); switch ($RX_TYPE) { case "image": $resultStr = $this->receiveImage($postObj); break; } logger("T ".$resultStr); echo $resultStr; }else { echo ""; exit; } }