note 97206 added to function.curl-setopt
| From: | julienveneziano at osu1 dot php dot net | Date: | Thu, 08 Apr 2010 10:56:37 +0000 |
| Subject: | note 97206 added to function.curl-setopt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168008@lists.php.net to get a copy of this message | ||
If you need to send deta in a DELETE request, use:
<?php
$request_body = 'some data';
$ch = curl_init('http://www.example.com');
curl_setopt($ch, CURLOPT_POSTFIELDS, $request_body);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
$response = curl_exec($ch);
var_dump($response);
?>
----
Server IP: 69.147.83.197
Probable Submitter: 122.208.20.66
----
Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php
Edit -- https://master.php.net/note/edit/97206
Del: integrated -- https://master.php.net/note/delete/97206/integrated
Del: useless -- https://master.php.net/note/delete/97206/useless
Del: bad code -- https://master.php.net/note/delete/97206/bad+code
Del: spam -- https://master.php.net/note/delete/97206/spam
Del: non-english -- https://master.php.net/note/delete/97206/non-english
Del: in docs -- https://master.php.net/note/delete/97206/in+docs
Del: other reasons-- https://master.php.net/note/delete/97206
Reject -- https://master.php.net/note/reject/97206
Search -- https://master.php.net/manage/user-notes.php