Supported Versions: PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8
Initialize a cURL session
<?php curl_init(?string $url = null): CurlHandle|false
<?php $this->config->prohibitUrlByConfig($url, $this->io);
}
$curlHandle = curl_init();
$headerHandle = fopen('php://temp/maxmemory:32768', 'w+b');
if ($copyTo) {
<?php CURLOPT_FILE => $fp,
];
$ch = curl_init($url);
curl_setopt_array($ch, $options);
curl_exec($ch);
curl_close($ch);
<?php CURLOPT_FILE => $fp,
];
$ch = curl_init($url);
curl_setopt_array($ch, $options);
curl_exec($ch);
curl_close($ch);
<?php CURLOPT_FILE => $fp,
];
$ch = curl_init($url);
curl_setopt_array($ch, $options);
curl_exec($ch);
curl_close($ch);
<?php private function waitNextInvocation(): array
{
if ($this->curlHandleNext === null) {
$this->curlHandleNext = curl_init("http://{$this->apiUrl}/2018-06-01/runtime/invocation/next");
curl_setopt($this->curlHandleNext, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($this->curlHandleNext, CURLOPT_FAILONERROR, true);
<?php }
if ($this->curlHandleResult === null) {
$this->curlHandleResult = curl_init();
curl_setopt($this->curlHandleResult, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($this->curlHandleResult, CURLOPT_RETURNTRANSFER, true);
curl_setopt($this->curlHandleResult, CURLOPT_FAILONERROR, true);