function send_post($url, $post_data) {
$o = '' ;
foreach ($post_data as $k => $v) {
$o .= $k . '=' . urlencode ($v) . '&';
}
$post_data = substr($o, 0, -1);
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
$result = curl_exec ($ch);
curl_close($ch);
return $result;
}