note 87457 deleted from wrappers.http by bjori

From: Date: Thu, 11 Dec 2008 13:23:46 +0000
Subject: note 87457 deleted from wrappers.http by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148027@lists.php.net to get a copy of this message
Note Submitter: vipz Reason: useless ---- How to POST without cURL or handcrafting the HTTP request, shamelessly stolen from http://netevil.org/blog/2006/nov/http-post-from-php-without-curl <?php 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; return file_get_contents($url, 0, stream_context_create($params)); } ?>

« previous php.notes (#148027) next »