You can simulate the post method using php without the help of curl library.
download full source code:
OpenID Integration PHP

See the code below:

function do_post_request($url, $data, $optional_headers = null) {

$params = array('http' =>; array('method' =>; 'POST',

'content' =>; $data

));

if ($optional_headers !== null) {

$params['http']['header'] = $optional_headers;

}

$ctx = stream_context_create($params);

$fp = @fopen($url, 'rb', false, $ctx);

if (!$fp) {

throw new Exception("Problem with $url, $php_errormsg");

}

$response = @stream_get_contents($fp);

if ($response === false) {

throw new Exception("Problem reading data from $url, $php_errormsg");

}

return $response;

}

?>

Download the full source code from post_without_curl.zip


Add to Del.cio.us RSS Feed Add to Technorati Favorites Stumble It!

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!