getBalance(); $message = preg_replace('/\r?\n/m', '\n', trim($json['Message'])); if ($balance < $config['reserve']) { header("HTTP/1.0 402 Payment Required"); } else { $sipgate->sendSMS($config['recipient'], $message, NULL, $config['recipient']); } break; default: header("HTTP/1.1 501 Not Implemented"); } } else { header("HTTP/1.1 405 Method Not Allowed"); } ?>