This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ------------------------------------------------------------------------------- */ foreach($_POST as $key => $post) { $key = str_replace("_", ".", $key); $poststr.= "$key=".urlencode($post)."&"; } $poststr = substr($poststr, 0, -1); $fp = fsockopen("127.0.0.1", 3003, $errno, $errstr); if (!$fp) { $error = "Fehler beim Verbinden mit dem Voicebox Interface;error\n"; } else { $path = "/vmail.cgi"; $header = "POST $path HTTP/1.0 Content-Type: application/x-www-form-urlencoded Cookie: format=wav; Authorization: Basic ".base64_encode($VARS["ASTERISK_WEBINTERFACE"][1]["USER"].":".$VARS["ASTERISK_WEBINTERFACE"][1]["PASSWD"])." Content-Length: ".strlen($poststr)." $poststr "; // echo "
$header
//
// ".urldecode($poststr)."\n\n";
fputs($fp, $header);
$bStart = FALSE;
while(!feof($fp)) {
$line = fgets($fp);
if($line == "\r\n") {
$bStart = TRUE;
#echo "\n";
}
if($bStart)
echo $line;
}
fclose($fp);
}
msg($error);
?>