Forgive me for possibly misusing certain terminology. I would like to:
- open a html/php file, with php
- find elements with certain class
- change its innerHtml basically
- than save the file.
I have a feeling DOMElement in php could help, since I've used it for similar things in javascript, but I am (still) unsure of its function in PHP and php.net sais a DOM document "Represents an entire HTML or XML document"
(so no php/javascript containing document).
- So: which function(s), libraries should I study to best perform those operations?
- Possibly: Aside from php.net do you perhaps have a good tutorial for ^that^ solution?
Edit: Possibly related: Manipulate HTML from php Edit2: If I would build something with my knowledge a.t.m. it would probably be almost as violent as solutions I tried earlier: https://stackoverflow.com/a/8960363/574700
- There will be php in the document.
- There will be some inline css and javascript in there.