public function postRequest(SS_HTTPRequest $request, SS_HTTPResponse $response, DataModel $model)
 {
     if (!$response->isError() && !Director::is_ajax()) {
         // Find or create the visitor record
         $visitor = Visitor::initVisitor();
         // Log the arrival of this visitor to this page
         $visitor->logPageArrival();
     }
 }
Ejemplo n.º 2
0
 public function handleVisitor()
 {
     $exceptions = array('95.154.224.214', '10.0.0.163', '217.205.168.248');
     if (!in_array($_SERVER['REMOTE_ADDR'], $exceptions)) {
         // Find or create the visitor record
         $visitor = Visitor::initVisitor();
         // Log the arrival of this visitor to this page
         $visitor->logPageArrival();
     }
 }