I just recently changed my hosting service, and suddenly there are a few errors in my code, that wasn't there before on my old host service. How would I fix this:
$proxy = $_SERVER['HTTP_X_FORWARDED_FOR'];
error: Undefined index: HTTP_X_FORWARDED_FOR
$date = date('y-m-d');
error: Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CST/-6.0/no DST' instead
^---I just want to get the date.
When I tried to use date_default_timezone_set('US/Eastern');
, it printed out as just 1
. That's it.