note 15443 added to function.wddx-deserialize
| From: | php at mike2k dot com | Date: | Mon, 10 Sep 2001 22:06:10 +0000 |
| Subject: | note 15443 added to function.wddx-deserialize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17889@lists.php.net to get a copy of this message | ||
if you have WDDX data coming from a third party source and it isnt being parsed correctly in your
php, try translating their WDDX. we have a third party sending us WDDX from cold fusion, and it uses
a <recordset> element, which PHP seems to ignore (looking around the web we found some other
people having trouble) so the (hopefully temporary) solution we found was to translate the WDDX
midstream and then we were able to parse it:
$url = "http://somedomain.com/blah.wddx";
$fp = fopen($url,"r");
$page = fread($fp,10000);
fclose($fp);
$page = str_replace("<recordset","<struct",$page);
$page = str_replace("</recordset","</struct",$page);
$page = str_replace("<field","<var",$page);
$page = str_replace("</field","</var",$page);
$values = wddx_deserialize($page);
while(list($key,$val) = each($values)) {
print "$key => $val<BR>";
}
this works for us. it's a hack, and hopefully php will support this in the future or something.
http://www.php.net/manual/en/function.wddx-deserialize.php