package IP::IPwhere;
use 5.006;
use strict;
use warnings;
use Data::Dumper;
use LWP::Simple;
use JSON;
use Encode;
use utf8;
our @ISA = qw(Exporter);
our @EXPORT =
qw(squery query getTbeIParea get
法: ./ipwhere.pl 8.8.8.8 8.8.8.6
需要安装perl及扩展LWP::Simple;use JSON;
建议通过cpanm LWP::Simple JSON 一键安装。
=head1 VERSION
Version 0.05
=cut
our $VERSION = '0.06';
=
8&oe=gbk&format=json);
my $code = get($url);
#my $jso=$1 if $code =~/var remote_ip_info =(.*);$/;
print $code, "\n" if $DEBUG;
my $json = new JSON;
my $obj = $json->decode($code)