Exemplo n.º 1
0
 /**
  * Report this page to the tag system. A new resource is created if
  * the page has not already been reported, otherwise the page view
  * statistic is incremented.
  *
  * This information is cached in order to reduce the number of
  * database connections.
  */
 public function visit_resource($page_title = '')
 {
     $title = stripslashes(stripslashes(stripslashes($page_title)));
     $our_current_url = $this->curPageURL();
     //ridiculous var name to avoid namespace problems
     if ($this->ua_ignore($_SERVER['HTTP_USER_AGENT'], $this->loc->visit_ignore_useragent)) {
         return;
     }
     if ($this->ignore_check($our_current_url, $this->loc->visit_ignore_url)) {
         return;
     }
     if ($page_title && $this->ignore_check($page_title, $this->loc->visit_ignore_title)) {
         return;
     }
     $fc = new folksoClient($this->loc->web_url, $this->loc->server_web_path . 'admin/resource.php', 'POST');
     $fc->set_postfields(array('folksovisit' => 1, 'folksores' => $our_current_url, 'folksourititle' => $title ? $title : ''));
     $fc->execute();
 }