الجمعة، 20 ديسمبر 2013

Cannot find element using simple_html_dom.php

This is the script I am using:

find('#title'); echo count($title);?>

count($title) returns 0.

There is indeed a line in the web page

Folding Helping Hand Long-Reach Pick-Up Gripper - 26" Aluminum

but the simple_html_dom script cannot find it.

I have also tried

$title = $html->find('h1[id=title]');

but count($title) still returns 0.

I run

echo $html->plaintext;

and the title is there.

I have no idea what the problem is.

Any help is appreciated!

Edit:

I notice that stackoverflow somehow change my url after I save the post.

This is the correct function call: file_get_html("http://rads.stackoverflow.com/amzn/click/B000VS8CTM").


View the original article here

ليست هناك تعليقات:

إرسال تعليق