class curl {
private $options;
+ public $cache = false;
private $debug = false;
private $cookie = false;
public $version = '0.2 dev';
if(!empty($options['debug'])) {
$this->debug = true;
}
- $this->debug = false;
if(!empty($options['cookie'])) {
if(file_exists($options['cookie'])) {
$this->cookie = $options['cookie'];
}
}
if(!empty($options['cache'])) {
- $this->cache = new repository_cache;
+ if(class_exists('repository_cache')) {
+ $this->cache = new repository_cache;
+ }
}
$this->resetopt();
}
/**
* HTTP TRACE method
*/
- public function trace($url){
+ public function trace($url, $options = array()){
$options['CURLOPT_CUSTOMREQUEST'] = 'TRACE';
$ret = $this->request($url, $options);
return $ret;
/**
* HTTP OPTIONS method
*/
- public function options($url){
+ public function options($url, $options = array()){
$options['CURLOPT_CUSTOMREQUEST'] = 'OPTIONS';
$ret = $this->request($url, $options);
return $ret;