adding the php tags to my c&p
[php]
function coil($sending, $to) {
global $cookieStore;
$toCount = count($sending);
$toString = http_build_query($sending);
$curl = curl_init();
//set options
curl_setopt($curl, CURLOPT_URL, $to);
curl_setopt($curl, CURLOPT_REFERER, $to);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12');
curl_setopt($curl, CURLOPT_POST, $toCount);
curl_setopt($curl, CURLOPT_POSTFIELDS, $toString);
curl_setopt($curl, CURLOPT_COOKIEFILE, realpath($cookieStore));
curl_setopt($curl, CURLOPT_COOKIEJAR, realpath($cookieStore));
curl_setopt($curl, CURLOPT_VERBOSE, true);
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
// execute curl request
$response = curl_exec($curl);
//kill the connection
curl_close($curl);
return $response;
}
[/php]