View unanswered posts | View active topics It is currently Tue Nov 20, 2018 3:33 pm



Reply to topic  [ 1 post ] 

SImple HTML DOM parser not parsing <body> tag

Sponsor

Sponsor
 

SImple HTML DOM parser not parsing <body> tag 
Author Message
amoeba

Joined: Wed Jun 07, 2017 8:21 am
Posts: 2
Post SImple HTML DOM parser not parsing <body> tag
I am using this html dom parser to attempt and parse an external url. I am capable to use it properly on various pages.

However when I attempt parse to the website software companies in Abu Dhabi

The parser isn’t identifying the <body> tag in the html.

require 'simple_html_dom.php';

$html = file_get_html('http://talksport.com/football/atletico-madrid-beat-arsenal-and-west-ham-signing-portuguese-wonderkid-diogo-jota');

// Find any tag for eg. <div>
$tag = $html->find('div',0);
var_dump($tag);

I get valueless as the outcome.

I try to catch that why this is happening and found that

$x = $html->find('html',0)->children();

$x has simply one child which is the <head> tag. The <body> tag isn’t parsed at altogether.

Someone come across such an problem before? Please help.


Wed Jun 07, 2017 9:06 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron