Add some phpgw headers for id

This commit is contained in:
Miles Lott 2001-08-13 21:56:41 +00:00
parent 2665284fad
commit 3e8e749624

View File

@ -26,8 +26,8 @@
var $errno;
var $errstring;
var $debug=0;
var $username="";
var $password="";
var $username = '';
var $password = '';
function xmlrpc_client($path='', $server='', $port=80)
{
@ -88,18 +88,20 @@
// thanks to Grant Rauscher <grant7@firstworld.net>
// for this
$credentials="";
$credentials = '';
if ($username!="")
{
$credentials = "Authorization: Basic " . base64_encode($username . ":" . $password) . "\r\n";
}
$op= "POST " . $this->path . " HTTP/1.0\r\nUser-Agent: PHP XMLRPC 1.0\r\n" .
"Host: ". $this->server . "\r\n" .
$credentials .
"Content-Type: text/xml\r\nContent-Length: " .
strlen($msg->payload) . "\r\n\r\n" .
$msg->payload;
$op = "POST " . $this->path . " HTTP/1.0\r\nUser-Agent: PHP XMLRPC 1.0\r\n"
. "Host: ". $this->server . "\r\n" .
. 'X-PHPGW-Server: ' . $this->server . ' ' . "\r\n"
. 'X-PHPGW-Version: ' . $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] . "\r\n"
. $credentials
. "Content-Type: text/xml\r\nContent-Length: "
. strlen($msg->payload) . "\r\n\r\n"
. $msg->payload;
if (!fputs($fp, $op, strlen($op)))
{