there is a currency conversion site at the following address:
https://www.tgju.org/currency
How can I buy prices like dollars and...?
I have a sample code that finds only one specific class using "file_get_contents" my code:
$content = file_get_contents("https://www.tgju.org/currency");
$dom = new DOMDocument();
$dom->loadHTML($content);
$finder = new DomXPath($dom);
$classname = "nf";
$nodes = $finder->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' $classname ')]");
$data1 = $nodes{0}->nodeValue;
Thank you for helping me to complete the code
Looking at the HTML, I see that the US dollar row has the
data-market-rowattribute set toprice_dollar_rl. And then all the info you want to read is then stored in some<td>cells.So you could change your XPath query to get all these cells and then take the value of the one you desire:
This outputs: