|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-07-22 22:35 UTC] nefthy-php dot net at nefthy dot de
[2010-07-22 22:38 UTC] nefthy-php dot net at nefthy dot de
[2010-07-23 00:21 UTC] uramihsayibok at gmail dot com
-PHP Version: 5.3.2
+PHP Version: 5.3.2, libcurl 7.20.0
[2010-07-23 00:21 UTC] uramihsayibok at gmail dot com
[2010-07-23 01:13 UTC] nefthy-php dot net at nefthy dot de
[2010-11-30 14:40 UTC] iliaa@php.net
[2010-11-30 14:40 UTC] iliaa@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: iliaa
[2010-11-30 14:40 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 14:00:01 2025 UTC |
Description: ------------ (Background: curl_easy_setopt(3) supports a CURLOPT_PRIVATE that takes a char* and does nothing with it. It can then be retrieved with curl_easy_getinfo(3) and CURLINFO_PRIVATE -- cURL >=7.10.3) While the two CURL*_PRIVATE constants aren't mentioned in any detail in the PHP manual, they are listed in cURL's predefined constants page, and using (eg) an array for the value results in an array->string conversion warning, so I guess there's at least a little bit of support somewhere. However using them gives buggy results - mostly binary junk. Test script: --------------- $curl = curl_init("http://www.example.com"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_PRIVATE, "123"); // * curl_exec($curl); var_dump(curl_getinfo($curl, CURLINFO_PRIVATE)); // * mostly happens with numbers; try different string lengths Expected result: ---------------- string(3) "123" Actual result: -------------- string([varies]) "[binary junk]"