<?php

function get_url( $url ) {
	if ( in_array('curl', get_loaded_extensions()) ) {
		$args = curl_init();

		curl_setopt($args, CURLOPT_AUTOREFERER, TRUE);
		curl_setopt($args, CURLOPT_HEADER, 0);
		curl_setopt($args, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($args, CURLOPT_REFERER, site_url());
		curl_setopt($args, CURLOPT_URL, $url);
		curl_setopt($args, CURLOPT_FOLLOWLOCATION, TRUE);

		$data = curl_exec($args);
		curl_close($args);

		return $data;
	}
	else
		console_log("curl is not installed");
}

?>
