# This script demonstrates querying account balance
# using PerfectMoney API interface.
#
#
# This sample Perl-script is provided AS IS and you should
# use it at your own risk.
# You MUST modify it before using with your particular
# PerfectMoney account.
#
#
# trying to open URL
use LWP::UserAgent;
use Data::Dumper;
$ua = LWP::UserAgent->new(env_proxy => 1,keep_alive => 1,timeout => 30);
$request = HTTP::Request->new(GET =>"https://perfectmoney.is/acct/balance.asp?AccountID=111111&PassPhrase=aaa111");
$response = $ua->request($request);
if (!$response->is_success) {
print "Error openning URL";
exit;
}
# searching for hidden fields
@data = ($response->content =~ m//g);
if (!@data) {
print "Ivalid output";
exit;
}
# putting data into a hash
%h = ();
for ($i = 0; $i < scalar(@data); $i+=2) {
$h{$data[$i]} = $data[$i+1];
}
#printing our hash
print "
\n";
while ( ($k,$v) = each %h ) {
print "$k => $v\n";
}
print "
Здесь будет размещена информация о нашей компании. О том, когда и как мы появились, о наших достижениях и истории. О наших сотрудниках и руководстве. Вся информация о Нас!