我用我CRIPT下面的代碼獲取源代碼的一部分,我需要 但得到這個錯誤簡單的HTML DOM的PHP捲曲的錯誤不能搶文本,我需要
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ')' in /home/cyberhos/public_html/CH/tes.php on line 151
simple_html_dom.php已經在我的腳本發出elswhere
if (isset($_POST['mp'], $_POST['delim'], $_POST['submit'])) {
$mps = preg_split('/\r\n|\r|\n/', $_POST['mp']);
// Create an array to store results
$result_data = array();
// Iterate over requests
foreach ($mps as $mp) {
$mp = explode($_POST['delim'], $mp);
// Store the account details in variables
list($email, $password) = $mp;
// Get HTML data
$html_string = checkmail($email, $password);
$html = str_get_html($html_string);
$body = $html->find('div[id="welcome_text"]);
// Prepare a reusable string
$result_string = "Checked " . $email . " : " . $password . " is ";
// Append necessary word to it
if ($html>welcome_text === "Welcome to Tesco.com. We hope that you enjoy your visit.") {
$result_string .= "LIVE";
} else {
$result_string .= "DEAD";
}
我怎樣才能解決這個錯誤,有沒有什麼辦法讓我的腳本工作正常
繼承人部O,我可以解決這個錯誤˚F源代碼,我試圖讓
<div id="welcome_text" class="">
<div class="box">
Welcome to Tesco.com. We hope that you enjoy your visit.
<a id="ctl00_ctl00_lnkLogin" href="javascript:__doPostBack('ctl00$ctl00$lnkLogin','')">Log out</a>
</div>
單引號'''缺少近線' $ body = ...'。您可以通過檢查上面發佈的代碼中的顏色差異來清楚地瞭解這一點。 – Rikesh 2013-04-29 09:42:11
你可以做一個編輯,所以我可以看到你的意思:) – 2013-04-29 09:42:40
第17行的錯字:'$ body = $ html-> find('div [id =「welcome_text」]''');' – 5ervant 2013-04-29 09:51:17