note 102264 added to function.curl-setopt
| From: | anon at mousedotcom | Date: | Fri, 04 Feb 2011 18:11:42 +0000 |
| Subject: | note 102264 added to function.curl-setopt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-176691@lists.php.net to get a copy of this message | ||
If your POST data seems to be disappearing (POST data empty, request is being handled by the server
as a GET), try rearranging the order of CURLOPT_POSTFIELDS setting with CURLOPT_NOBODY.
CURLOPT_POSTFIELDS has to come AFTER CURLOPT_NOBODY setting because if it comes after it wipes out
the Content-Type header that tells your URL target that the request is a POST not a GET.
Not sure if this is expected behavior but it certainly isn't documented (except on
Stackoverflow.com, which is supremely unhelpful - BTW, guys over on stack overflow... once
you've figured out a PHP problem, posting the solution here would save everyone extra search
time).
----
Server IP: 208.69.120.55
Probable Submitter: 69.124.45.183
----
Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php
Edit -- https://master.php.net/note/edit/102264
Del: integrated -- https://master.php.net/note/delete/102264/integrated
Del: useless -- https://master.php.net/note/delete/102264/useless
Del: bad code -- https://master.php.net/note/delete/102264/bad+code
Del: spam -- https://master.php.net/note/delete/102264/spam
Del: non-english -- https://master.php.net/note/delete/102264/non-english
Del: in docs -- https://master.php.net/note/delete/102264/in+docs
Del: other reasons-- https://master.php.net/note/delete/102264
Reject -- https://master.php.net/note/reject/102264
Search -- https://master.php.net/manage/user-notes.php