Skip to content
Advertisement

Tag: domdocument

DOMDocument – get script text from within body

What I am trying to do is get scripts from body tag but only scripts that have text not script links eg. <script type=”text/javascript”>console.log(“for a test run”);</script> not the scripts that have file src. And I want to place those scripts to end of page before </body>. So far I have Update 1 The problem is <script type=”text/javascript”> can also

Advertisement