Answer the question
In order to leave comments, you need to log in
How to parse the contents of a script tag in php?
You need to parse data from the page from the script tag. For example:
<script>
window.runParams = {
data: {"actionModule": 123}
}
</script>
Answer the question
In order to leave comments, you need to log in
<?php
$str = file_get_contents('http://site.com');
preg_match_all('#<script>(.+?)</script>#su', $str, $res);
var_dump($res);
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question