WWW::Alexa::TrafficRank - Query Alexa.com Traffic Rank of website.
use WWW::Alexa::TrafficRank;
my $tr = WWW::Alexa::TrafficRank->new();
print $tr->get('filedir.com');
The WWW::Alexa::TrafficRank is a class implementing a interface for querying Alexa.com Traffic Rank.
WWW::Alexa::TrafficRank
To use it, you should create WWW::Alexa::TrafficRank object and use its method get(), to query traffic rank of Domain.
It uses LWP::UserAgent for making request to Alexa.com
LWP::UserAgent
This method constructs a new WWW::Alexa::TrafficRank object and returns it. Key/value pair arguments may be provided to set up the initial state. The following options correspond to attribute methods described below:
KEY DEFAULT ----------- -------------------- agent "Opera 10.0" proxy undef timeout undef
agent specifies the header 'User-Agent' when querying Alexa. If the proxy option is passed in, requests will be made through specified poxy. proxy is the host which serve requests to Alexa.
agent
proxy
Queries Alexa for a specified traffic rank URL and returns traffic rank text value. If query fails for some reason (Alexa unreachable, undefined url passed) it return error string.
If you find any, please report ;)
FileDir <guruperl@cpan.org>.
Copyright 2016, FileDir, All Rights Reserved.
You may use, modify, and distribute this package under the same terms as Perl itself.
To install WWW::Alexa::TrafficRank, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Alexa::TrafficRank
CPAN shell
perl -MCPAN -e shell install WWW::Alexa::TrafficRank
For more information on module installation, please visit the detailed CPAN module installation guide.