/** * Check if CURL is available and can be used to connect to OneAll */ function oa_social_login_check_curl($secure = true) { if (oa_social_login_check_curl_available()) { $result = oa_social_login_curl_request(($secure ? 'https' : 'http') . '://www.oneall.com/ping.html'); if (is_object($result) and property_exists($result, 'http_code') and $result->http_code == 200) { if (property_exists($result, 'http_data')) { if (strtolower($result->http_data) == 'ok') { return true; } } } } return false; }
/** * Checks if CURL can be used */ function oa_social_login_check_curl($secure = true) { if (in_array('curl', get_loaded_extensions()) and function_exists('curl_init')) { $result = oa_social_login_curl_request(($secure ? 'https' : 'http') . '://www.oneall.com/ping.html'); if (is_object($result) and property_exists($result, 'http_code') and $result->http_code == 200) { if (property_exists($result, 'http_data')) { if (strtolower($result->http_data) == 'ok') { return true; } } } } return false; }