Menu

## Curl
in package

Curl.php : 26

cURL session manager

### Table of Contents

$ch : mixed
__construct() : mixed
  Initialize a cURL session
__destruct() : mixed
  Closes a cURL session and frees all resources. The cURL handle, ch, is also deleted.
errno() : int
error() : string
exec() : bool|string
  Perform a cURL session
getinfo() : array<string|int, mixed>
  Gets information about the last transfer.
setoptArray() : bool
  Set multiple options for a cURL transfer

### Properties

#### $ch

Curl.php : 29
`private mixed $ch`

### Methods

#### __construct()

Curl.php : 36

Initialize a cURL session

`public __construct(string $url) : mixed`

##### Parameters

$url : string

##### Return values

mixed —

#### __destruct()

Curl.php : 93

Closes a cURL session and frees all resources. The cURL handle, ch, is also deleted.

`public __destruct() : mixed`

##### Return values

mixed —

#### errno()

Curl.php : 77
`public errno() : int`

##### Return values

int —

Returns the error number or 0 (zero) if no error occurred.

#### error()

Curl.php : 85
`public error() : string`

##### Return values

string —

Returns the error message or '' (the empty string) if no error occurred.

#### exec()

Curl.php : 59

Perform a cURL session

`public exec() : bool|string`

##### Return values

bool|string —

Returns TRUE on success or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set, it will return the result on success, FALSE on failure.

#### getinfo()

Curl.php : 69

Gets information about the last transfer.

`public getinfo() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### setoptArray()

Curl.php : 48

Set multiple options for a cURL transfer

`public setoptArray(array<string|int, mixed> $options) : bool`

##### Parameters

$options : array<string|int, mixed>

  Returns TRUE if all options were successfully set. If an option could not be successfully set, FALSE is immediately returned, ignoring any future options in the options array.

##### Return values

bool —

## Search results