You are here

protected function PhpCurlHttpClient::getCurlResource in Backup and Migrate 8.4

Get the CURL Resource with default options.

Parameters

$url:

Return value

resource

1 call to PhpCurlHttpClient::getCurlResource()
PhpCurlHttpClient::post in lib/backup_migrate_core/src/Service/PhpCurlHttpClient.php
Post the given data (as a string or an array) to the given URL.

File

lib/backup_migrate_core/src/Service/PhpCurlHttpClient.php, line 64

Class

PhpCurlHttpClient
Class PhpCurlHttpClient.

Namespace

BackupMigrate\Core\Service

Code

protected function getCurlResource($url) {
  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_FAILONERROR, TRUE);
  return $ch;
}