evet file get contents ile çektiğim url kısmında tarih 7 gün şeklinde artıyor çekeceğim 1. veri 20150101 iken çekeceğim 2. veri 20150108 şeklinde oluyor
böyle böyle gidiyor
Genel mantık şu;
Başlangıç tarihi atıyorsun değişkene sonra 7 ekleyerek o değişken değişiyor şeklinde. Javascript ile çalıştırdığın dosyaya tarihi yolluyor bu şekilde gelen yeni değer hep bir sonraki tarih oluyor.
Örnek bir uygulama aşağıdaki gibidir. Kodu kendine göre değiştirirsin artık
<?php
$tarih = isset($_GET['tarih']) ? $_GET['tarih'] : '2015-01-01';
$tarih = date('Ymd', strtotime($tarih) );
echo $url = 'http://www.abc.com/?id=' . $tarih;
$tarih = date('Y-m-d', strtotime( '+7 days', strtotime($tarih) ) );
?>
<script type="text/javascript">
//window.location = 'http://localhosttakiadresim.com/?tarih=<?php echo $tarih?>';
alert('Bir sonraki tarih : <?php echo $tarih;?>');
</script>