function Post($url, $post = null) {
    if (is_array($post)) {
        ksort($post);
        $content = http_build_query($post);
        $content_length = strlen($content);
        $options = array(
            'http' => array(
                'method' => 'POST',
                'header' =>
                "Content-type: application/x-www-form-urlencodedrn" .
                "Content-length: $content_lengthrn",
                'content' => $content
            )
        );
        return file_get_contents($url, false, stream_context_create($options));
    }
}