The problem is retrieving and displaying the contents of the div. To catch this, this is with multiclass:
<li class="activity user-generated" id="activity:153411947-kIq0nOFam0hE68sL6P298_DIo4s-1386284074745">
Probably, I could work with it easier if in my case the identifier is not automatically generated for each new status.
Also, on this topic, is it possible to get each tag and put them in order?
Thank you for your time.
$classname = "activity";
$domdocument = new DOMDocument();
$domdocument->loadHTML($doc);
$a = new DOMXPath($domdocument);
$spans = $a->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' $classname ')]");
when $ doc is the page I load
Well, let me restart this, as the fact that this does not work really annoys me.
What I'm trying to do is read from the element that I posted, but I need to call it from the URL, since it reads only the element itself, since HTML is fine. From the URL I get a bunch of unnecessary errors, basically repeating the same thing.
Function obtainUserStatus($Username){
$DOM = new DOMDocument();
$Class = "activity";
$DOM->loadHTMLFile('http://lifestream.aol.com/stream/' . $Username);
$X = new DOMXPath($DOM);
$ID = $X->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' $Class ')]")->item(0)->getAttribute('id');
Echo $ID;
}
What exactly returns errors.
div ( , - ).