When capturing the contents of a web page, CURL or file_get_contents , which is the easiest way to remove the built-in javascrip codes. I am thinking of a regex to remove everything between tags; but regular expression is not a reliable method for this purpose.
Is there a better way to parse an html page (just removing javascript codes)? If regex is still the best option, what is the most reliable command for this?
source share