我用我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