# -*- mode: perl; coding: utf-8 -*-
# keitairc/lib/plugins/00location_receiver
# 位置情報送信、のコールバック
-# $Id: 00location_receiver,v 1.15 2009-09-24 16:17:00 morimoto Exp $
+# $Id: 00location_receiver,v 1.16 2009-09-25 15:05:48 matusita Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/plugins/00location_receiver,v $
#
# The line number (1 incremented) and filename below must be
$xml_code .= $buf;
}
my $xml = XMLin($xml_code);
- if($xml->{status} ne 'true'){
+ if($xml->{status} ne '200'){
return;
}
- return $xml->{prefecture}->{pname} .
- $xml->{municipality}->{mname} .
- $xml->{local}->{section};
+ return $xml->{result}->{prefecture}->{pname} .
+ $xml->{result}->{municipality}->{mname} .
+ $xml->{result}->{local}->{section};
}
# maps.google.com を使ってgeocode逆変換