Pandacado adlı üyeden alıntı: mesajı görüntüle
Çok teşekkür ederim hocam
Özel mesaj ile yardım istemişsin. Sana yardım ettim ancak cevabını buraya yazıyorum ki, ihtiyacı olan herkes faydalansın.

Senin talebin:
<?php

$bosgazte ="fotomac";
$glink = $_POST['gazatebaslik'];
if( $glink = $_POST['gazatebaslik'] ){
$gbaslik = $gdetay[1];
$gazetetarih = date("dmy");

echo '<a href="[URL]https://i13.haber7.net/haber7/gazete/'.$bosgazte.'/big_'.$gazetetarih.'_0800.jpg?'.$gazetetarih.'_080[/URL] 0"><img src="[URL]https://i13.haber7.net/haber7/gazete/'.$bosgazte.'/big_'.$gazetetarih.'_0800.jpg?'.$gazetetarih.'_080[/URL] 0" width="450px" height="250px"></a> ';
echo '<br>';
echo '<a href="[URL]https://i13.haber7.net/haber7/gazete/'.$bosgazte.'/big_'.$gazetetarih.'_0800.jpg?'.$gazetetarih.'_080[/URL] 0" >Büyük Ekran Yap</a>';


} else
{
$gazetetarih = date("dmy");

echo '<a href="[URL]https://i13.haber7.net/haber7/gazete/'.$bosgazte.'/big_'.$gazetetarih.'_0800.jpg?'.$gazetetarih.'_080[/URL] 0"><img src="[URL]https://i13.haber7.net/haber7/gazete/'.$bosgazte.'/big_'.$gazetetarih.'_0800.jpg?'.$gazetetarih.'_080[/URL] 0" width="450px" height="250px"></a> ';
echo '<br>';
echo '<a href="[URL]https://i13.haber7.net/haber7/gazete/'.$bosgazte.'/big_'.$gazetetarih.'_0800.jpg?'.$gazetetarih.'_080[/URL] 0"" >Büyük Ekran Yap</a>';

}

?>
Benim yazdığım ve çalışan kod:

function getIMG($url){
$userAgent = $_SERVER['HTTP_USER_AGENT'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$html = curl_exec($ch);
if ( !$html ) {
return curl_errno($ch);
} else {
return $html;
}
}

function tarihget(){
$gun = date("d");
$ay = date("m");
$yil = date("Y");
$yil = str_replace("0", "", $yil);
$data = $gun . $ay . $yil;
return $data;
}

$glink = $_POST['gazatebaslik'];
$tarih = tarihget();

if ( !empty($glink) ) {
$url = 'https://i13.haber7.net/haber7/gazete/'.$glink.'/big_'.$tarih.'_0800.jpg?v='.$tarih.'_080';
$x_url = 'https://cdn.r10.net/ogmeta.png';
$imgData = getIMG($url);
if ( $imgData != 22 ) {
echo '<a href="'.$url.'"><img src="'.$url.'" width="450px" height="250px"></a><br /><a href="'.$url.'" >Büyük Ekran Yap</a>';
} else {
echo '<a href="'.$x_url.'"><img src="'.$x_url.'" width="450px" height="250px"></a><br /><a href="'.$x_url.'" >Büyük Ekran Yap</a>';
}
} else {
echo 'form post edilmedi';
}