HTTP::MobileUserID::Nihongo - 携帯端末のユーザIDを取得する
use HTTP::MobileUserID; use HTTP::MobileAgent; my $agent = HTTP::MobileAgent->new; my $userid = HTTP::MobildUserID->new($agent); if ( $userid->supported ) { print $userid->id; }
携帯端末のユーザIDを取得します。
DoCoMoの場合は端末ID、SoftBankの場合はユーザID、AUの場合はサブスクライバIDを返します。
ユーザIDを返します。
ユーザIDが取得できなかった場合は未定義値を返します。
その端末がそもそも固有のユーザIDを取得できるかどうかを判定します。
unsupportedが真になるのは以下のケース
DoCoMoのHTMLバージョンが2.0以下の端末はutn属性が使えないので端末固有のIDを取得することは不可能。
SoftBankのC型端末はユーザIDの取得ができない。(公式サイトなら可能、だったはず)
端末IDの取得には対応しているが何らかの理由でユーザIDが取得できないケースがあるのでそれを判定します。
no_user_idが真になるのは以下のケース
DoCoMoでutn属性のリンクを経由しなかった場合
SoftBankでユーザIDの通知設定を行わなかった場合
AUでサブスクライバIDの通知設定を行わなかった場合
Ittetsu Miyazaki <ittetsu.miyazaki@gmail.com>
Thanks to Dan Kogai
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
HTTP::MobileAgent
To install HTTP::MobileUserID, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::MobileUserID
CPAN shell
perl -MCPAN -e shell install HTTP::MobileUserID
For more information on module installation, please visit the detailed CPAN module installation guide.