function after_upstream_callback($info, &$headers, &$body) { $dec_obj = mta_decode($headers, $body, 'after_return_data'); if ($dec_obj['status'] == 'ok' and $dec_obj['res']) { $body = $dec_obj['res']; } }
function after_upstream_callback($info, &$headers, &$body) { $url = $info['url']; $path = parse_url($url, PHP_URL_PATH); $mta_content = mta_decode($headers, $body); $title = 'recv ' . $path . ' ' . keyval_str($mta_content); jsondb_logger('nofity', $title, ['url' => $url, 'info' => $info, 'headers' => $headers, 'body' => $body, 'bin2hex' => hex_view($body), 'decode' => $mta_content]); }