好的,所以我们来这里是我的 curl 脚本
<?php
// Function file
include('func.php');
//Data for Check function
$user = "username goes here";
$password = "password goes here";
//Data for boundary values
$upper_boundary = "999.99";
$lower_boundary = "0.00";
//Login script
checkcpu($user, $password);
//Check script
$html = check('https://example/home.aspx');
$dom = new DOMDocument();
@$dom->loadHTML($html);
$xpath = new DOMXPath($dom);
$value = $xpath->query('//label[@id="ctl00_ctl00_PageContainer_MyAccountCpuContainer_symPercent"]/following-sibling::text()')->item(0)->nodeValue;
//Checking for value and echo results
if (($value >= $lower_boundary) && ($value <= $upper_boundary)) {
$result_string = "Checked ". $user . " : " . $password . " cpu cooling rat:";
echo "Live - $result_string $value";
//Erase Cookie Content
signout();
}else{
checkcpu($user, $password);
//Check script
$html = check('https://example/home.aspx');
$dom = new DOMDocument();
@$dom->loadHTML($html);
$xpath = new DOMXPath($dom);
$value = $xpath->query('//label[@id="ctl00_ctl00_PageContainer_MyAccountCpuContainer_symPercent"]/following-sibling::text()')->item(0)->nodeValue;
if (($value >= $lower_boundary) && ($value <= $upper_boundary)) {
$result_string = "Checked ". $user . " : " . $password . " cpu cool rate:";
echo "Live - $result_string $value";
//Erase Cookie Content
signout();
}else{
echo "Die - $user $password $value";
}
}
?>
我想发送一组数据,我将其复制并粘贴到这样的文本框中
user:pass
user:pass
user:pass
user:pass
user:pass
user:pass
user:pass
user:pass
user:pass
user:pass
我希望使用 ajax 将此数组发送到我的 php 文件,以便用户进入用户名进入我的 curl 脚本,输入密码的密码进入此处,然后将我的结果以 1×1 的数组回显