您可以尝试使用自定义操作作为目标并使用 cURL 发出两个请求
<?php
$targets = array('http://example.com/wp-login-one.php',
'http://example.com/wp-login-two.php');
$cookie = 'cookie.txt'; // MUST be writable to script
$postdata = '';
foreach($_POST as $key => $value){
$postdata .= '&'.$key.'='.$value;
}
foreach($targets as $url){
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_USERAGENT, "Put your desired User Agent here");
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt ($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt ($ch, CURLOPT_POST, 1);
$result = curl_exec ($ch);
curl_close($ch);
echo $result;
}
?>
这是未经测试的代码 - 虽然可以肯定它会工作 - 如果需要,我可以进一步改进它以在野外工作!