Skip to content

CurlHandler :: getInfo(constant)

Brian Boll edited this page Apr 22, 2018 · 2 revisions

CurlHandler :: getInfo(constant)

$ch = new CurlHandler('http://example.com');

$ch->execute();

echo $ch->getInfo(CURLINFO_EFFECTIVE_URL);

Parameters [1]:

[1] constant: A constant representing one of the libcurl information retrieval options detailed more here.

Note: many of these options require the handle to have been executed first before retrieving any information and once the handle is closed the information is lost

Returns:

The numerical constant CURLE_OK (0) will be returned if that option is supported. If the option is not supported then one of the numbers corresponding to an error will be returned. Those errors are detailed here

Clone this wiki locally