{curl 'https://...'} fetches a URL and answers the body of the response as the
tag's value - a value, so braces in it stay text. url= or the first parameter gives
the address; SELF:// at its start becomes this site's own host and mount prefix,
so an application can call itself wherever it is served. A $name=value written on
the tag is added to the URL as a query value.
The tag's parameters as a whole are the input of padCurl(): post=
makes the request a POST with that body, user= and password= are
basic authentication, and get=, cookies=, headers= and
options= (curl options by name) are arrays. Any answer but HTTP 200 is a PAD error,
and nothing of the failing answer goes into the page.
With ttl=600 the answer is kept ten minutes: the requests in that time are
answered from the copy. When the source fails after the ttl the last good copy is served and the
failure goes to the error log (and to the application's _events/curl.php); only a
good answer is kept. $padCurlCache picks the store - 'file' (the
default), 'apcu', 'redis', 'memcached' or
FALSE. data='https://...' on a tag takes the same ttl=
and reads the answer as data, and padPrefetch in the page's PHP fetches several
sources in parallel.
In tests padCurlFake answers every fetch from fakes. A remote fetch is neither
deterministic nor allowed here, so the examples are shown, not run.