I am trying to get some webpage content using php curl.
I have this php code:
$target_url="http://me.dealintech.com/partho.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
$file_contents=curl_exec($ch);
include('simple_html_dom.php');
$html = str_get_html($file_contents);
$elem = $html->find('div[id=basic_info_content]');
echo "var_dump output: ";
var_dump($elem);
And the output I get is :
[ here I get the whole webpage contents I targeted ]
var_dump output: array(0) { }
So I am getting all contents but not the specific div content. How I can get that using div id or/and class
echo $html;please. Does that div you are looking at show?echo $html;is very large string. Rather you see dealintech.com/a.php which shows the output you are asking for.