I am trying to scrap some content from a website but the code below is not working(not showing any output). here is the code
$url=\"some url\";
$otherHeader
Yes, you are missing something very basic: It's XHTML, so you must register (and use!) the proper namespace before you can expect to get results.
$xpath->registerNamespace('x', 'http://www.w3.org/1999/xhtml');
$path1="//x:body/x:table[4]/x:tbody/x:tr[3]/x:td[4]";
$path2="//x:body/x:table[4]/x:tbody/x:tr[1]/x:td[4]";
$item1=$xpath->query($path1);
$item2=$xpath->query($path2);