/**
* Creates HTTP request
*
* @param string $url Url to send the request
* @param string $method HTTP request method (GET, POST, PUT, DELETE, etc)
* @param bool $return_only_status If set to true, the method would only return response status
* @param mixed $content Content to be sent with HTTP request
* @param string $header Header to be set for the HTTP request
*
* @return mixed
*/
public static function httpRequest($url, $method, $return_only_status = false, $content = null, $header = "")
{
if (function_exists('curl_init')) {
return Util::httpRequestCurl($url, $method, $return_only_status, $content, $header);
} else if (ini_get('allow_url_fopen')) {
return Util::httpRequestFopen($url, $method, $return_only_status, $content, $header);
}
return null;
}