In php how would I grab all javascript from a page given it’s url? Is there a good regular expression to get the src of all javascript script tags or the script inside of them?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use PHP Simple HTML DOM to traverse the DOM for
<script>tags. You can grab inline scripts directly in a string and get thesrcattribute for externally linked scripts and download them directly with curl or something. It would require some coding, I don’t know if there is a ‘magic’ script that would do that automatically for you.