Arama butonu
Bu konudaki kullanıcılar: 1 misafir
0
Cevap
873
Tıklama
0
Öne Çıkarma
Galatasaray Fikstür Scripti (ORG'dan)
S
11 yıl (654 mesaj)
Yüzbaşı
Konu Sahibi

Arkadaşlar bir iş için lazım olmuştu. İhtiyacı olanlar için burayada koyayım dedim.
Kolay gelsin...

<?php 

header('Content-Type: text/html; charset=utf-8');
date_default_timezone_set('Europe/Istanbul');

$ay = date('m');
$yil = date('Y');


$url = 'http://www.galatasaray.org/fixtures?month='.$ay.'&year='.$yil;
$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"X-Requested-With: XMLHttpRequest\r\n"
)
);

$context = stream_context_create($opts);
$fikstur = file_get_contents($url, false, $context);
if(json_decode($fikstur)){
foreach (json_decode($fikstur) as $fiks){
preg_match('/\d+/', $fiks->MatchDate, $matches);
$tarih = date("d-m-Y", substr($matches[0], 0, -3)) ;

echo $tarih;
echo "<br>";
echo $fiks->Text;
echo "<br><hr>";
}
}
?>