Sha256: ec8f36b22a18ebe49239b976a035626918e413ae35905bf34cb364b417d425a4

Contents?: true

Size: 193 Bytes

Versions: 4

Compression:

Stored size: 193 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

4 entries across 4 versions & 1 rubygems

Version Path
knjrbfw-0.0.8 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.7 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.4 lib/knj/scripts/ip2location.rb
knjrbfw-0.0.3 lib/knj/scripts/ip2location.rb