I'm new here and don't have knowledge in PHP. anyway, i have a wesbite which display sport matches updated automatically from a XML feed provider. The problem is, at 12 AM the "Today's matches" should be updated, but instead it will update at 12 PM. in another way, it displays yesterday's matches till 12 PM for the next day. This is the code:
- Code: Select all
<?php ob_start();
include('header.php');
$flagged1=0;
$flagged2=0;
if(isset($_GET["date"]) and $_GET["date"]!="")
{
$dtShow=$_GET["date"];
if($dtShow=="tomorrow")
{
$yest=date("y-m-d",time()+(60*60*48));
$time=date("y-m-d",time()+(60*60*24));
}
else if($dtShow=="yest")
{
$yest=date("y-m-d",time());
$time=date("y-m-d",time()-(60*60*24));
}
else
{
$yest=$_GET["date"]." 00:00:00";
$newDate = strtotime($yest);
$yest=date('y-m-d', $newDate);
$time=date("y-m-d",$newDate-(60*60*24));
}
}
else
{
$yest=date("y-m-d",time()+(60*60*24));
$time=date("y-m-d",time());
Any help will be really appreciated.
Thanks!

