したがって、Pastebin の API ( https://pastebin.com/api#9 ) を使用して、ユーザーの投稿を一覧表示しています。しかし、それが言っていることに基づいて、ペーストを一覧表示するにはユーザーのパスワードを知る必要があるようです?
PHP スクリプト:
$api_dev_key = 'DEV KEY';
$api_user_key = 'USER KEY';
$api_results_limit = '100';
$url = 'https://pastebin.com/api/api_post.php';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_option=list&api_user_key='.$api_user_key.'&api_dev_key='.$api_dev_key.'&api_results_limit='.$api_results_limit.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_NOBODY, 0);
$response = curl_exec($ch);
echo $response;
必要なユーザー キー (Dev キー、ユーザー名、およびパスワード) を取得するために、ペーストを一覧表示するために資格情報が必要なのはなぜですか? それらなしでそれを行う方法はありますか?