function http_request_use_curl in Feeds 6
Same name and namespace in other branches
- 8.2 libraries/http_request.inc \http_request_use_curl()
- 7.2 libraries/http_request.inc \http_request_use_curl()
- 7 libraries/http_request.inc \http_request_use_curl()
Decides if it's possible to use cURL or not.
Return value
bool TRUE if cURL is available, FALSE otherwise.
1 call to http_request_use_curl()
- http_request_get in libraries/
http_request.inc - Get the content from the given URL.
File
- libraries/
http_request.inc, line 258 - Download via HTTP.
Code
function http_request_use_curl() {
// Allow site administrators to choose to not use cURL.
if (variable_get('feeds_never_use_curl', FALSE)) {
return FALSE;
}
// Check availability of cURL on the system.
$basedir = ini_get("open_basedir");
return function_exists('curl_init') && !ini_get('safe_mode') && empty($basedir);
}