als RSS-Feed abonnieren
Bewerbungen
Projektarbeit
Ruby-in-Second-Life
Clatronic-CTV731-bei-Saturn
xml-ferientermine
XML-Ferientermine
T_Shirts_Mousepads
Singleboersenvergleich
TimeSystem
Katzen
katzen
Arbeitsamt_I
Klick
2007-01-21
2007-01-19
Leapc
iMacros-to-Watir-Konverter
ASP
Ruby-Stocks
National-Geograpic
Google-Kalender
XML-Ruby
XMLTV
css
scribus
ruby-links
c-sharp
videos-fuer-psp-konvertieren
tchibo-infoglobe
uuencode-ruby
linux-phone-neo-1973
mx600-mouse
ruby-mechanize-https
ncurses
internetcafes
corba
ruby-einladung
ruby-setup
ruby-xml
watir
find-ersatz-in-ruby
ruby-priority-queue
gem-needle
gem-dependency
index
DotNetTests
TDD
Gadgets
RSS
Geocaching
2006-10-22_CSS_hier
2006-10-22-zaurus
2006-10-22
2006-10-22_Mono_und_Linux


vom: 2007-01-31 08:06

 def count
    @klick = Klick.new
    user_agent = @request.user_agent.downcase
    @klick.user_agent = user_agent
    is_search_bot = false
    ['msnbot', 'yahoo! slurp','googlebot'].each { |b|
      @is_search_bot = true if user_agent.include? b
    }
    @klick.is_bot = @is_search_bot
    # @ip_address = @request.ip_address? # remote_addr
    # @klick.methods = @request.public_methods
    @klick.save
    flash[:notice] = 'Klick was successfully created.'
    redirect_to :action => 'list' end
  end
CREATE TABLE `klicks` (
  `id` int(11) NOT NULL auto_increment,
  `created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `user_agent` varchar(100) default NULL,
  `is_bot` tinyint(1) default NULL,
  `ip_address` varchar(40) NOT NULL,
  `methods` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;
Kontakt: Thomas Preymesser
Prinzenallee 36
13359 Berlin
Telefon: 030 - 49 78 37 06
mobile: 0172-8111959
eMail: thopre@gmail.com