note 1973 modified in function.wddx-deserialize by irchtml
| From: | irchtml@php.net | Date: | Wed, 03 Mar 2004 08:40:22 +0000 |
| Subject: | note 1973 modified in function.wddx-deserialize by irchtml | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66152@lists.php.net to get a copy of this message | ||
The packet string you pass to this function doesn't have to be sanitized first; it searches for
a WDDX packet within the string. So the string can contain HTML markup and random text outside of
the packet, and that is all ignored.
This means you can get a packet from another web page like this:
$fhandle = fopen("http://myserver.com/packet.php",
"r");
if ($fhandle) {
$page = fread($fhandle,10000);
fclose($fhandle);
$value = wddx_deserialize($page);
print "pi is:<br>" . $value["pi"] . "<p>\n";
} else {
print "could not get packet.php<p>";
}
--was--
The packet string you pass to this function doesn't have to be sanitized first; it searches for
a WDDX packet within the string. So the string can contain HTML markup and random text outside of
the packet, and that is all ignored.
This means you can get a packet from another web page like this:
<pre>
$fhandle = fopen("http://myserver.com/packet.php",
"r");
if ($fhandle) {
$page = fread($fhandle,10000);
fclose($fhandle);
$value = wddx_deserialize($page);
print "pi is:<br>" . $value["pi"] . "<p>\n";
} else {
print "could not get packet.php<p>";
}
</pre>
http://www.php.net/manual/en/function.wddx-deserialize.php