php - How to download STANDARD-XML metadata from RETS using PHRETS -
is there solution download standard-xml metadata rets using phrets?
currently able extract each class metadata array using phrets function getmetadatatable , combining & converting xml format.
but found difference in single standard-xml metadata(of entire resources , classes) , individual class metadata. using metadata viewer service retsmd.com(built on phrets) also, class name getting standard-xml metadata different , unable view details.
note: got standard-xml metadata via direct browser log-in using credentials, http://rets.login.url/getmetadata?type=metadata-table&format=standard-xml&id=0
anyone faced same? there solution using php?
thanks in advance!
i got solution modifying phrets library. added new function there following code,
if (empty($this->capability_url['getmetadata'])) { die("getserverinformation() called unable find getmetadata location. failed login?\n"); } $optional_params['type'] = 'metadata-system'; $optional_params['id'] = '*'; $optional_params['format'] = 'standard-xml'; //request server information $result = $this->retsrequest($this->capability_url['getmetadata'], $optional_params ); if (!$result) { return false; } list($headers, $body) = $result; $xml = $this->parsexmlresponse($body);
note: main thing note is,
$optional_params['id'] = '*';
should '*' instead '0'
Comments
Post a Comment