if (!empty($_SERVER['HTTP_CLIENT_IP']))
$ip=$_SERVER['HTTP_CLIENT_IP'];
else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
else
$ip=$_SERVER['REMOTE_ADDR'];
?>
Last month I posted a Small Talk discussing the use of ZK Calendar with a database. Since then I have been working closely with ZK Calendar and thought I would share another way of achieving the same effect. The implementation hinges on the extending the AbstractCalendarModel which provides a more OO approach.