function post($url, $post){
$context = array();
if (is_array($post)){
ksort($post);
$context['http'] = array(
'method' => 'POST',
'content' => http_build_query($post, '', '&')
);
}
else{
$context['http'] = array(
'method' => 'POST',
'content' => $post
);
}
return @file_get_contents($url, false, stream_context_create($context));
}