arkadaşlar örn: resim urlsi
http://ats.vimeo.com/659/741/65974114_640.jpg
ekrana yazılar fln geliyor...
örn:
http://ats.vimeo.com/659/581/65958109_640.jpg
buna tıklayınca resim geliyor
adreste eğer resim varsa yada yoksa fonksiyonu nasıl olur?
açılmıyorsa resim yok.jpg resmini koycam
URL deki resim açılıyorsa yada açılmıyorsa ?
19
●950
- 19-05-2010, 21:20:39Üyeliği durduruldu
$thumb = "url"; $kontrol = fopen($thumb, "r"); if ($kontrol) { echo "dosya var"; } else { echo "dosya yok"; }boylede olabilir ara sıra çalışmadıgınıda gordum. sende dene olursa kullanırsın.
ben kendi yazdıgım botta bunu kullanıyorum. - 19-05-2010, 21:23:03Valla yazdık bir şeyler. Hemde google bot gibi gösterdim kendimi. Denedim oldu.
<?php error_reporting(E_ALL); $curl = curl_init(); $header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,"; $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"; $header[] = "Cache-Control: max-age=0"; $header[] = "Connection: keep-alive"; $header[] = "Keep-Alive: 300"; $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $header[] = "Accept-Language: en-us,en;q=0.5"; $header[] = "Pragma: "; curl_setopt($curl, CURLOPT_URL,"http://ats.vimeo.com/659/581/65958109_640.jpg"); curl_setopt($curl, CURLOPT_COOKIEFILE,"video.txt"); curl_setopt($curl, CURLOPT_COOKIEJAR,"video.txt"); curl_setopt($curl, CURLOPT_HEADER,1); curl_setopt($curl, CURLOPT_FOLLOWLOCATION,1); curl_setopt($curl, CURLOPT_RETURNTRANSFER,1); curl_setopt($curl, CURLOPT_USERAGENT, 'Googlebot/2.1 (+http://www.google.com/bot.html)'); curl_setopt($curl, CURLOPT_HTTPHEADER, $header); curl_setopt($curl, CURLOPT_REFERER, 'http://www.google.com'); curl_setopt($curl, CURLOPT_AUTOREFERER, true); $veri=curl_exec($curl); $desen = '#Content-Type: image/(.*?)#si'; if(preg_match($desen,$veri)){ echo 'resim var'; }else{ echo 'resim yok'; } ?>