I've been having an issue trying to parse text in a span cass with DOM. Here is my code example. try to extract some lines out of a webpage - with following technique: with the Extraction of values of attributes of elements with DOMDocument
Here is what i have gathered and learned:
$remote = "http://website.com/"; $doc = new DOMDocument(); @$doc->loadHTMLFile($remote); $xpath = new DOMXpath($doc); $node = $xpath->query('//span[@class="user"]'); echo $node;
and this returns the following
error -> "Catchable fatal error: Object of class DOMNodeList could not be converted to string".
I am so lost..
What I am trying to do is parse the user name between this tag;
Proceedings; i checked the source of the webpage. i tried to find out whether the texte is related to some kind of pattern.i have looked closely and found that all of them have class=”widget plugin-meta”. Well - This will make extracting them, a piece of cake. I tried with the code below helps to filter html elements based on values of attributes.
but unfortunatly this ends up in a bad result; i need a helping hand and need to know how to parse the above mentioned data
goal: i need the following data: Version: Last updated: Active installations: Tested up:
Not such a great deal, Ultimate, which gives you full 5080 features is $181.99 CAD per month, that's $2183.88 per year, I can buy the 5080 for $1809.99 CAD, then it goes up to $279.99 per month after the first billing cycle. Typical cloud rental, costs more than buying the hardware.
Wow, spoken like a true blind hater, you don't even provide arguments. Please, go check my comment above to @seacaptain and you'll find out why what you say doesn't make sense in this context...
Get used to this, with AI tooling now uncovering new vulns and getting them exploitable far faster than has ever been possible before software is going to need to be updated far more frequently.
Back in the day it may take reseachers weeks or months to do what AI can now do in hours.
Once its a threat is discovered it's weaponsized far more quickly, meaning you simply can't be waiting 2, 3, 4 weeks to deploy a patch, it needs to be patched immediately.
Going to be interesting handling this in the enterprise space where traditionally patching has been steady, but very staged (and rightly so up until now), that is going to have to change.
Question
tarifa
hello dear community,
I've been having an issue trying to parse text in a span cass with DOM. Here is my code example. try to extract some lines out of a webpage - with following technique: with the Extraction of values of attributes of elements with DOMDocument
Here is what i have gathered and learned:
$remote = "http://website.com/"; $doc = new DOMDocument(); @$doc->loadHTMLFile($remote); $xpath = new DOMXpath($doc); $node = $xpath->query('//span[@class="user"]'); echo $node;and this returns the following
error -> "Catchable fatal error: Object of class DOMNodeList could not be converted to string".I am so lost..
What I am trying to do is parse the user name between this tag;
see more below:
Here the concrete example view-source: https://wordpress.org/plugins/participants-database/ and https://wordpress.org/plugins/participants-database/
goal i need the following data:
Version: Last updated: Active installations: Tested up:
view-source: https://wordpress.org/plugins/participants-database/
Proceedings; i checked the source of the webpage. i tried to find out whether the texte is related to some kind of pattern.i have looked closely and found that all of them have class=”widget plugin-meta”. Well - This will make extracting them, a piece of cake. I tried with the code below helps to filter html elements based on values of attributes.
but unfortunatly this ends up in a bad result; i need a helping hand and need to know how to parse the above mentioned data
goal: i need the following data: Version: Last updated: Active installations: Tested up:
any ideas!?
Edited by tarifaLink to comment
https://www.neowin.net/forum/topic/1389257-php-dom-document-and-xpath-fetch-class-data/Share on other sites
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now