diff --git a/plugin/LiveLinks/getImage.php b/plugin/LiveLinks/getImage.php index 04a08c934..c7670f601 100644 --- a/plugin/LiveLinks/getImage.php +++ b/plugin/LiveLinks/getImage.php @@ -1,56 +1,62 @@ getUsers_id(), $_REQUEST['live_servers_id']); //var_dump($livet['users_id'], $_REQUEST['live_servers_id'],$uploadedPoster );exit; if(file_exists($uploadedPoster)){ header('Content-Type: image/jpg'); echo file_get_contents($uploadedPoster); exit; } } $video = $liveLink->getLink(); if (preg_match("/\b(?:(?:https?):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i", $video)) { $url = $config->getEncoderURL() . "getImage/" . base64_encode($video) . "/{$_GET['format']}"; $name = "liveLinks_getImage_".md5($url); $content = ObjectYPT::getCache($name, 600); if(empty($content)){ $content = url_get_contents($url, "", 2); if(!empty($content)){ ObjectYPT::setCache($name, $content); } } } if(!empty($content)){ echo $content; }else{ echo local_get_contents($filename); } \ No newline at end of file