function retrieve_url( $url, $postName, $postValue ) {
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => false, // return headers
CURLOPT_FOLLOWLOCATION => true, // follow redirects
CURLOPT_ENCODING => "", // handle all encodings
CURLOPT_USERAGENT => "Mozilla/4.0 (compatible; MSIE 6.1; Windows XP)",
CURLOPT_AUTOREFERER => true, // set referer on redirect
CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect
CURLOPT_TIMEOUT => 120, // timeout on response
CURLOPT_MAXREDIRS => 10, // stop after 10 redirects
CURLOPT_POST => TRUE, // send POST data
CURLOPT_POSTFIELDS => "$postName=" . urlencode( $postValue ), // this is the POST data
CURLOPT_HTTPHEADER => array( "Content-Type:application/x-www-form-urlencoded" )
);
$ch = curl_init( $url );
curl_setopt_array( $ch, $options );
//Make the curl request
$data = curl_exec( $ch );
curl_close( $ch );
return $data;
}