Re: XML_RPC for php5

From: Date: Wed, 29 Sep 2004 03:38:22 +0000
Subject: Re: XML_RPC for php5
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33582@lists.php.net to get a copy of this message
Incidentally, one side effect of how my implementation works is important. If you don't have the xmlrpc extension installed, and want to make a type dateTime or base64, you must *always* operate on a copy of the original item. <?php require_once 'XML/RPC5.php'; // this is a bad idea, by the way - don't send passwords // at all if they can be unencrypted to plaintext $a = array('user' => 'blah', 'pass' => 'somepassword'); $base = XML_RPC5::factory(); $base->setType($a['pass'], 'base64'); var_dump($a); ?> This will output: array(2) { ["user"]=> string(4) "blah" ["pass"]=> object(XML_RPC5_Custom)#2 (2) {
    ["_type:private"]=>
    string(6) "base64"
    ["_value:private"]=>
    string(12) "somepassword"
} } This will tend to affect clients more than servers, as clients are more likely to re-use parameters than a server. Greg

« previous php.pear.dev (#33582) next »