[phpxmlrpc] [Fwd: XMLRPC Class]

Edd Dumbill edd at usefulinc.com
Tue Dec 16 22:30:24 GMT 2003


-----Forwarded Message-----
From: Laurent GROUSSET <laurent.grousset at temma.com>
To: edd at usefulinc.com
Subject: XMLRPC Class
Date: Tue, 16 Dec 2003 15:03:42 +0100



Hy,

 

Well i have use your usefull XMLRPC class …

But i need to specify an idsession to connect to the server.

 

So i modify you class. You can catch it in the attached file.

 

I’ve just add this in the xmlrpc_client class :

 

            var $sid='';

            

            function setSessionID($thisSID)

            {

                        $this->sid=$thisSID;

            }

 

 

And this to the sendPayloadHTTP10 methode o:

 

$credentials='';

                        if ($username!='')

                        {

                                   $credentials='Authorization: Basic '
. base64_encode($username . ':' . $password) . "\r\n";

                        }

                        

                        if ($this->sid!='')

                        {

                                   $credentials.='Cookie: sid=' .
$this->sid . "\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;

 

I hope i twill be usefull for you.

 

Best regards.

 

Laurent


-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmlrpcClientGateway.inc
Type: application/octet-stream
Size: 1526 bytes
Desc: not available
Url : http://lists.usefulinc.com/pipermail/phpxmlrpc/attachments/20031216/f8e83b6e/xmlrpcClientGateway.obj


More information about the phpxmlrpc mailing list