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.49 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.48 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.47 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.46 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.45 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.44 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.43 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.42 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.41 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.40 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.39 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.38 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.37 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.36 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.35 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.34 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.33 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.32 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.31 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.30 lib/knj/scripts/ip2location.rb