Sha256: 3fe602ba0959e9a7725543533bc74c1439a8c1620a3cb30ee8a2ec673eb9b30d

Contents?: true

Size: 195 Bytes

Versions: 61

Compression:

Stored size: 195 Bytes

Contents

#!/usr/bin/env ruby

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

data = ip2loc.lookup(ARGV[0])

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

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
knjrbfw-0.0.72 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.71 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.70 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.69 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.68 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.67 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.66 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.65 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.64 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.63 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.62 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.59 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.58 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.57 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.55 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.54 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.53 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.52 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.51 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.50 lib/knj/scripts/ip2location.rb