tags:

views:

341

answers:

2

Could you describe it in examples, please?

+1  A: 

Have a look at

CALLBACK OPTIONS for definition and

The callbacks.php Example

astander
A: 

It is used with curl_setopt function.

CURLOPT_WRITEFUNCTION is the name of a callback function where the callback function takes two parameters. The first is the cURL resource, and the second is a string with the data to be written. The data must be written by using this callback function. Must return the exact number of bytes written or this will fail.

Sarfraz
What does this mean: "Must return the exact number of bytes written or this will fail"?
MrY
How's that? What is the exact number of bytes written?
MrY
see this for an example of that answer: http://download1.parallels.com/Plesk/Expand/2.1.0-Release1/doc/expand-integrate-guide/17009.htm
Sarfraz
and yes you are right, it must return exact bytes.
Sarfraz
what exact bytes?
MrY
And what for does it have to return the exact bytes? What's useful about it?
MrY
i think you should have a look at the example usage link i posted in my prevoius comments to get more idea about it and there are furnther explanations at the bottom of that page, Thanks
Sarfraz
Thanks. I saw. But what's useful about it?
MrY