note 95733 modified in book.curl by danbrown
| From: | danbrown@php.net | Date: | Tue, 19 Jan 2010 16:13:18 +0000 |
| Subject: | note 95733 modified in book.curl by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-165115@lists.php.net to get a copy of this message | ||
This is something obscure I noticed... If you try to use something like:
<?php
curl_setopt($agent, CURLOPT_POST, true);
curl_setopt($agent, CURLOPT_POSTFIELDS, $post_data);
?>
so that you POST something to a URL. Then if you screwed up your URL slightly like:
http://www.example.com
rather than
http://www.example.com/ (note the slash)
hence, causing a redirect, then your posted data won't be sent once the redirect occurs.
--was--
This is something obscure I noticed... If you try to use something like:
curl_setopt($agent, CURLOPT_POST, true);
curl_setopt($agent, CURLOPT_POSTFIELDS, $post_data);
so that you POST something to a URL. Then if you screwed up your URL slightly like:
http://www.example.com
rather than
http://www.example.com/ (note the slash)
hence, causing a redirect, then your posted data won't be sent once the redirect occurs.
http://php.net/manual/en/book.curl.php