PEAR_REST::retrieveData() – Retrieve a remote REST resource


require_once '/REST.php';

string|array PEAR_REST::retrieveData ( string $url , array|false $accept = false , bool $forcestring = false )


retrieve the contents of a remote resource.


string $url

full URL to this resource

array|false $accept

contents of the accept-encoding header

boolean $forcestring

if TRUE, xml will be returned as a string, otherwise, xml will be parsed using PEAR_XMLParser


throws PEAR_Error objects are returned on error.


This function can not be called statically.

Retrieve REST data, but always retrieve the local cache if it is available. (Previous) Save the value retrieved from a remote REST resource in the local cache. (Next)
Last updated: Tue, 19 Jun 2018 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.