note 41256 added to function.curl-setopt

From: Date: Sun, 04 Apr 2004 17:20:19 +0000
Subject: note 41256 added to function.curl-setopt
Groups: php.notes 
Request: Send a blank email to php-notes+get-67624@lists.php.net to get a copy of this message
A bit more documentation (without minimum version numbers): - CURLOPT_WRITEFUNCTION - CURLOPT_HEADERFUNCTION Pass a function which will be called to write data or headers respectively. The callback function prototype: long write_callback (resource ch, string data) The ch argument is CURL session handle. The data argument is data received. Note that its size is variable. When writing data, as much data as possible will be returned in all invokes. When writing headers, exactly one complete header line is returned for better parsing. The function must return number of bytes actually taken care of. If that amount differs from the amount passed to this function, an error will occur. - CURLOPT_READFUNCTION Pass a function which will be called to read data. The callback function prototype: string read_callback (resource ch, resource fd, long length) The ch argument is CURL session handle. The fd argument is file descriptor passed to CURL by CURLOPT_INFILE option. The length argument is maximum length which can be returned. The function must return string containing the data which were read. If length of the data is more than maximum length, it will be truncated to maximum length. Returning anything else than a string means an EOF. [Note: there is more callbacks implemented in current cURL library but they aren't unfortunately implemented in php curl interface yet.] ---- Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41256 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41256&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41256&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67624) next »