[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Demexp-dev] Cookie..

From: Diogene Laerce
Subject: [Demexp-dev] Cookie..
Date: Sat, 22 Sep 2007 13:25:46 +0700

Hi David,

Sorry but I didnt have much time this week, so here am I :

I tried your python approach but I must have missed something. Heres the

include '';

$server = new


$login  =       new xmlrpcval("root", "string");
$passwd =       new xmlrpcval("demexp", "string");

$message = new xmlrpcmsg("login", array($login, $passwd));

$result = $server->send($message);

// Process the response.
if (!$result)
     print "<p>Could not connect to HTTP server.</p>";
elseif ($result->faultCode())
     print "<p>XML-RPC Fault #" . $result->faultCode() . ": " .
        $cookie =  $result->value();
                echo 'Valeur du cookie=>'.$cookie;

It return a : 
Catchable fatal error: Object of class xmlrpcval could not be converted
to string

In second hand, I saw this in the "xmlrpc2.2 for php" doc :


$client->setCookie($name, $value, $path, $domain, $port);

string  $name;
string  $value;
string  $path;
string  $domain;
int     $port;


This should be used to set a cookie to send back to the server for
dialog purpose. So I ve got quesstions on that :

Is the $name should be the "id + pwd" string ?

Is the $value the int value returned by the server ?

And what about the $path, $domain and $port, should I use them or not ?
And if so : what are they ?

So a lot of questions wich I dont have the answer.. If you can tell me
what do you think about that.


PS : The server response debug :

HTTP/1.0 200 OK
Date: Sat, 22 Sep 2007 06:09:32 GMT
Content-Length: 129
Content-Type: text/xml
Server: Apache/1.3.33 (Unix) PHP/4.3.11 mod_perl/1.29

<?xml version='1.0'?>

HEADER: date: Sat, 22 Sep 2007 06:09:32 GMT
HEADER: content-length: 129
HEADER: content-type: text/xml
HEADER: server: Apache/1.3.33 (Unix) PHP/4.3.11 mod_perl/1.29
   'me' => 
  array (
    'int' => 332720051,
   'mytype' => 1,
   '_php_class' => NULL,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]