|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-07-30 17:07 UTC] sterling@php.net
[2001-07-30 17:08 UTC] sterling@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 18:00:01 2025 UTC |
Hi, the code: ---- $ch = curl_init ("http://www.php.net/"); $fp = fopen ("php_homepage.txt", "w"); for ($str["field1"]="",$i=0;$i<256;$i++,$str["field1"].=chr($i)){} curl_setopt ($ch, CURLOPT_POSTFIELDS, $str); curl_setopt ($ch, CURLOPT_FILE, $fp); curl_setopt ($ch, CURLOPT_HEADER, 1); //curl_setopt ($ch, CURLOPT_BINARYTRANSFER, 1); curl_exec ($ch); curl_close ($ch); fclose ($fp); ----- are not binary safe. if the CURLOPT_BINARYTRANSFER set to "1", cURL results: "Warning: Cannot call the CURLOPT_WRITEFUNCTION" Regards, -- Steve