スクリプトで solvemedia キャプチャを挿入する方法を知りたいです。私は彼らのサイト (https://portal.solvemedia.com/media/download/WWW-SolveMedia-1.1.tar.gz) からモジュールをインストールしましたが、これを追加する場所がわかりません (彼らの指示):
プラグインがインストールされると、Solve Media API の呼び出しを開始できます。 ウィジェットを表示する
To display the Solve Media widget on one of your forms, instantiate the SolveMedia class, supplying it with your API keys. Then call the get_html function. You can find your API keys at My account:
use WWW::SolveMedia;
my $c = WWW::SolveMedia->new( 'my challenge key',
'my verification key',
'my hash key' );
# output widget
print $c->get_html();
Process Answer
You can check the user's response by calling SolveMedia.check_answer(...).
# check answer
my $result = $c->check_answer( $ENV{REMOTE_ADDR}, $challenge, $response );
if( $result->{is_valid} ){
print "Yay!";
}else{
print "Dang it :-(\n";
print "Error: ".$result->{error};
}
And this is where I get stuck, cos I don't have a clue how/where to insert that code. If anyone of you is willing to help, please respond. I'm willing to pay a few bucks.