views:

38

answers:

2

I'm using a framework which has curl handling encapsulated in the depths of it's class hierarchy. Basically I would like to change the way it does handle curl, without patching the files. It could be ideal if I could change curl defaults globally form outside. In php.ini or in similar way.

Any way to accomplish this?

+1  A: 

I don't believe this is possible w/o a reference to the cURL handle being used.

There are certainly no php.ini directives for cURL:

http://www.php.net/manual/en/curl.configuration.php

George Marian
A: 

Basically you set curl options on opened curl handler with curl_setopt. If you library doesn't allow you to manipulate the handler you cannot change any options.

Looks like in your case the only way is to either overload library classes or patch them.

kuba