<?php
function Post($url, $post = null)
{
$context = array();
if (is_array($post))
{
ksort($post);
$context = array(
'http' => array(
'timeout'=>60,
'method' => 'POST',
'header' => "Content-type: application/x-www-form-urlencoded ",
'content' => http_build_query($post),
),
);
}
return file_get_contents($url, false, stream_context_create($context));
}
$data = array
(
'parm1' => '1',
'parm2' => '2',
'parm3' => '3',
);
echo Post('this is your url', $data);
?>