「Padnote」の関連キーワード

 

Padnote

「Padnote」関連商品

#!/usr/bin/perl BEGIN { use FindBin qw($Bin); use lib './lib', "$FindBin::Bin/lib"; use CGI; use Jcode; use LWP::Simple; if($ENV{'SERVER_SOFTWARE'} =~ /IIS/i){ chdir $FindBin::Bin; } } $q = new CGI; require "./mk.pl"; @param = $q->param; %param = &get_param(@param); &Jcode::convert(\$param{key}, "utf8"); $key = url_encode($param{key}); &Jcode::convert($param{sort}, "utf8"); $sort = url_encode($param{sort}); $DevelopId = $param{DevelopId}; $AffId = $param{AffId}; $catid = $param{catid}; #2007-12-13 AuctionItemSearch my $plus = "%2b"; $sort =~ s/\+/$plus/g; # $url = qq(http://api.rakuten.co.jp/rws/1.10/rest?developerId=$DevelopId&operation=ItemSearch&version=2007-10-25&keyword=$key&affiliateId=$AffId&genreId=$catid&sort=$sort&hits=$param{hits}&imageFlag=1&availability=1); # $url = qq(http://api.rakuten.co.jp/rws/1.10/rest?developerId=$DevelopId&operation=ItemSearch&version=2007-10-25&keyword=$key&affiliateId=$AffId&sort=$sort&hits=$param{hits}&imageFlag=1&availability=1); # 2010/05/11 URLC iapio[W3.0(2009-04-15) $url = qq(http://api.rakuten.co.jp/rws/3.0/rest?developerId=$DevelopId&operation=ItemSearch&version=2009-04-15&keyword=$key&affiliateId=$AffId&sort=$sort&hits=$param{hits}&imageFlag=1&availability=1); &GetXML($url); sub url_encode { my $str = shift; $str =~ s/([^\w ])/'%'.unpack('H2', $1)/eg; $str =~ tr/ /+/; return $str; } sub GetXML{ my $url = shift; my $data = get($url); my $derim = ""; &Jcode::convert(\$data, "sjis"); my @getValue = ( 'itemName' ,'itemPrice' ,'itemCaption' ,'affiliateUrl' ,'imageFlag' ,'mediumImageUrl' ,'shopName' ,'shopUrl' ,'reviewCount' ); print qq(Content-type: text/html; charset=$CHARSET\n\n); my $i = 0; foreach my $cont (split(/$derim/,$data)){ if($i == 0){ $i++; next; } my %Data = (); foreach(@getValue){ if($cont =~ /\<$_\>(.*)\<\/$_\>/){ $Data{$_} = $1; } } # my $EnterMark = "B"; # my $Change = "B
"; # $Data{itemCaption} =~ s/$EnterMark/$Change/g; &Jcode::convert(\$Data{itemCaption}, "euc"); if($param{str} ne ""){ $Data{itemCaption} = &jtruncate($Data{itemCaption}, $param{str}); } foreach(keys %Data){ &Jcode::convert(\$Data{$_}, "sjis"); } my $PrintData = qq(

$Data{itemName}
) .qq(iF$Data{itemPrice}~
) .qq(r[F$Data{reviewCount}@r[mF
) .qq(VbvF$Data{shopName}

) .qq() .qq(

$Data{itemCaption}


); $PrintData = &Jcode::convert(\$PrintData, "$param{code}"); print $PrintData; $i++; } } sub jtruncate{ my($str,$n)=@_; $n ||=200; return $str if(length($str) <= $n); my $substr = substr($str,0,$n-3); if($substr =~ /\x8F$/ or $substr =~ tr/\x8E?xA1-\xFE// % 2){ chop $substr; } $substr .= "..."; return $substr; }

「Padnote」関連書籍

関連情報

Menu

今、検索されているキーワード


Copyright© 2008 楽天激安通販, All rights reserved.
コスメ娘。