<?php// create a new cURL resource$ch = curl_init();// set URL and other appropriate options$options = array(CURLOPT_URL => 'http://www.example.com/', CURLOPT_HEADER => false );curl_setopt_array($ch, $options);// grab URL and pass it to the browsercurl_exec($ch);// close cURL resource, and free up system resourcescurl_close($ch);?>
<?phpif (!function_exists('curl_setopt_array')) { function curl_setopt_array(&$ch, $curl_options) { foreach ($curl_options as $option => $value) { if (!curl_setopt($ch, $option, $value)) { return false; } } return true; } }?>