Contents of the 'misc' folder
All the files in the 'misc' folder are included here, generally these will be functions for include, and occasionaly other things of use.
fn.fetch.php
<?php function fetch($url,$post=false,$cookie=false,$timeout=30){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); if ($cookie) { curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie); } if ($post) { curl_setopt($ch, CURLOPT_POSTFIELDS, $post); curl_setopt($ch, CURLOPT_POST, TRUE); } curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); $output=curl_exec($ch); curl_close($ch); return $output; } ?>