- $ch = curl_init();
- curl_setopt ($ch, CURLOPT_URL, 'http://'.$site.$filename);
- curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookie.txt");
- curl_setopt ($ch, CURLOPT_HEADER, 0);
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
- // prevent warning while save_mode/open_basedir on (redireciton doesn't occur at least on ECB page)
- if (!ini_get('save_mode') && !ini_get('open_basedir'))
- curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt ($ch, CURLOPT_TIMEOUT, 3);
- $contents = curl_exec ($ch);
- curl_close($ch);
+ $ch = curl_init();
+ curl_setopt ($ch, CURLOPT_URL, 'http://'.$site.$filename);
+ curl_setopt ($ch, CURLOPT_COOKIEJAR, "$path_to_root/tmp/cookie.txt");
+ curl_setopt ($ch, CURLOPT_HEADER, 0);
+ curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
+ // prevent warning while safe_mode/open_basedir on (redireciton doesn't occur at least on ECB page)
+ if (!ini_get('safe_mode') && !ini_get('open_basedir'))
+ curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
+ curl_setopt ($ch, CURLOPT_TIMEOUT, 3);
+ $contents = curl_exec ($ch);
+ curl_close($ch);