NAME
WWW::Yandex::PhoneDetector - Detector mobile phone
SYNOPSIS
#!/usr/bin/perl
use strict;
use WWW::Yandex::PhoneDetector;
use Data::Dumper;
my $phone_detector = WWW::Yandex::PhoneDetector->new();
$phone_detector->user_agent('BlackBerry9700/5.0.0.351 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/123');
$phone_detector->get();
if($phone_detector->is_error){
print $phone_detector->is_error();
$phone_detector->flush();
exit;
}
if($phone_detector->is_phone){
print "yes mobile phone!\n"
print "details mobile phone!\n"
print Dumper $phone_detector->details();
$phone_detector->flush();
}
METHODS
user_agent
$phone_detector->user_agent('BlackBerry9700/5.0.0.351 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/123');
UserAgent your customers
get
$phone_detector->get();
Requires data from server
is_phone
$phone_detector->is_phone();
Returns 1 if a mobile phone
is_error
$phone_detector->is_error()
Returns the string with an error
flush
$phone_detector->flush()
Cleans internal buffer
details
$phone_detector->details();
Returns the hash detail phone
profile
$phone_detector->profile('');
If the http header is present "profile" send it with help of this method
wap_profile
$phone_detector->wap_profile('');
If the http header is present "wap-profile" send it with help of this method
x_wap_profile
$phone_detector->x_wap_profile('');
If the http header is present "x-wap-profile" send it with help of this method
x_operamini_phone_ua
$phone_detector->x_operamini_phone_ua('');
Additional title passed to the browser Opera Mini. Usually contains the full-browser version of mobile device.
AUTHOR
Kostya Ten, <kostya@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2010 by Kostya Ten