Don't check the certificate when transloading

This allows the download of images via https even if the cert is self-signed.
This commit is contained in:
HungryFeline 2013-07-02 04:44:27 +02:00
parent e547b1362f
commit 616aa3300a

View File

@ -805,6 +805,7 @@ function transload($url, $mfile) {
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_USERAGENT, "Shimmie-".VERSION);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_exec($ch);
curl_close($ch);
@ -816,7 +817,7 @@ function transload($url, $mfile) {
if($config->get_string("transload_engine") == "wget") {
$s_url = escapeshellarg($url);
$s_mfile = escapeshellarg($mfile);
system("wget $s_url --output-document=$s_mfile");
system("wget --no-check-certificate $s_url --output-document=$s_mfile");
return file_exists($mfile);
}