fatal error when trying to use structmem();
"barnbroker" <[email protected]> Thu, 12 Oct 2006 21:40:40 -0000
| Newsgroups | gmane.text.xml.rpc.specification |
|---|---|
| Message-ID | <[email protected]> |
Here's my php code:
<?php
require_once('xmlrpc/xmlrpc.inc');
$xmlrpc_msg = new xmlrpcmsg('examples.getallheaders');
$vidClient = new
xmlrpc_client('/server.php','phpxmlrpc.sourceforge.net',80);
$resp = $vidClient->send($xmlrpc_msg);
if (!$resp->faultCode()) {
$myList = xmlrpc_decode($resp->value());
$vidTitle = $myList->structmem('Host');
$Host = $vidTitle->scalarval();
echo $Host;
} else {
printf($resp->faultCode());
}
?>
When I try to run this I get a fatal error:
Fatal error: Call to a member function on a non-object in
/home/virtual/site303/fst/var/www/html/rpc_test.php on line 8
Line 8 is:
$vidTitle = $myList->structmem('Host');
Any ideas why this might be happening?
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/xml-rpc/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/xml-rpc/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[email protected]
mailto:[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/