Sha256: 4d92ab2cb9e762bec93e95ea33442d859dec80c8698de027b2f1bb8de88c6438

Contents?: true

Size: 189 Bytes

Versions: 40

Compression:

Stored size: 189 Bytes

Contents

#!/usr/bin/env ruby

require "knj/autoload"
ip2loc = Knj::Ip2location.new

data = ip2loc.lookup(ARGV[0])

if ARGV[1] == "json"
  print Php4r.json_encode(data)
else
  Php4r.print_r(data)
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
knjrbfw-0.0.116 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.115 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.114 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.113 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.111 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.110 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.109 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.108 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.107 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.105 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.104 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.103 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.102 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.101 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.100 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.99 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.98 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.97 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.96 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.95 lib/knj/scripts/ip2location.rb