Im trying to extract some information from a website. The info I need is contained in a table, I have already created a query to find it. When using the console from Chrome I can see the table I need is returned by the expression. But when I set up the PHP code, the query returns zero.
This is from the Chrome console
And this is my PHP code
$ch = curl_init($domain);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
$cl = curl_exec($ch);
$dom = new DOMDocument();
@$dom->loadHTML($cl);
$xpath = new DOMXPath($dom);
$table = $xpath->query("//div[@id='content_fmainplace']//form/table/tbody/tr[15]//table");
echo $table->length;
Any ideas? What am I missing here?