Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


array keyarray content value

The current HTTP Status code returned from the request (See

This response status code can be used to detect, for example 404 not found errors, or similar, of a page. By means, you may throw optional exceptions by checking this code state as you need.


The full response header returned from the request as ...

Code Block
titleHeader array
    'info' => array(),
    'full' => 'Full header as string'

... where info is an array with keys and values. Example:

Code Block
    "Server" => "Apache",
    "Strict-Transport-Security" => "max-age=63072000; includeSubDomains",
    "X-Frame-Options" => "SAMEORIGIN",
    "X-Powered-By" => "PHP/5.6.27"
bodyThe full returned body of the request

If the body are recognized as specially formatted (json, xml, etc), the parsed array will transform into an object or an array, depending on the content.

Currently, the parser supports simpler modes like XML (SimpleXMLElement) and by this also RSS-feeds (unconfirmed), JSON and serialized data.

Posting parameters

As of the release of 20161213, all functions that allows postData to be sent in a web call may be posted quite freely. You can either put postData in the standard format like:


You may also sent your requested data through the function as an array() or even a JSON-object. Such call may look like this:

doPost("", $postDataObject, CURL_POST_AS::POST_AS_JSON)

The function itself tries to detect if the input $postDataObject is encoded or decoded (keep in mind that problems with NAN-values or similar is not supported).

Simple usage example

There are four basic function calls, that by default handles http calls automatically. Normally, no further settings are required except for calling an URL. Posting data could be made manually or as an object. It also handles proxies, outgoing ip-addresses and hopefully also the ability to switch to explicit ipv6- or ipv4-mode.