I was wondering if it is possible to add an custom parameter to the function called when using
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, array($this, 'progressFunction'));
so the function signature would look like
private function progressFunction($clientp, $dltotal, $dlnow, $ultotal, $ulnow, $myCustomParameter) { }
instead of
private function progressFunction($clientp, $dltotal, $dlnow, $ultotal, $ulnow) { }
Thanks.
Ok this is strictly a suggestion and i will put it as an answer because i think it may work;
Php supports anonymous functions so you can pass it like so:
Now the trick is to pass your parameters using the
useso: