Selam arkadaşlar

Siteme bot ile film ekliyorum filmin resimlerinide sunucuma çekiyorum resimler sunucuya d41d8cd98f00b204e9800998ecf8427e.jpeg bu şekilde geliyor ben bunu nasıl sarap-bagi-izle.jpg bu şekilde film ismiyle çektirebilirim yani başlıkla.

Botun resimle ilgili olan kısmını aşağıya ekledim

preg_match_all('@<meta property="og:image" content="(.*?)" />@si',$icerik_baglan,$resim);
preg_match_all('@<div class="video">(.*?)src="(.*?)"@si',$icerik_baglan,$video);
$id = strip_tags($video[2][0]);
$player = '<iframe src="'.$id.'" framespacing="0" frameborder="no" scrolling="no" width="690" height="445"></iframe>';


$url = $resim[1][0]; 
$ch =curl_init();  
curl_setopt($ch, CURLOPT_URL,$url);  
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);   
$data= curl_exec($ch);  
curl_close($ch);  

$img_name=md5($data); 

if(!file_exists("2013/$img_name".".jpg")){ 

file_put_contents("2013/$img_name".".jpeg",$data);   

$resim_son = 'http://'.$_SERVER['HTTP_HOST'].'/resim/2013/'.$img_name.'.jpeg'; 
}