How to get json in the html?

<!DOCTYPE html>
<html lang="en-us">
the <head>
the <title>Text</title>
the <body>
 <div class="pane" role="main" onclick="void(0)">
 <div id="text" class="container tooltip-hide"></div>
<script type="text/javascript">
 pageContext: "",
 countryCode: "us",
 langCode: "en",
 errorMsg: ""
 Classify("").set("userObj", 'null');
 Classify("").set("countryLangLinks", '{"code":"us","languages":[{"code":"en","label":"English","selected":true},{"code":"es","label":"EspaƱol","selected":false}],"action":"/us/en/country","label":" United States"}');

the <script>
 Classify("").set("responseJson",{"DISPUTE_MESSAGE":"Test","results":[{"resultText":"LALALA."},{"resultText":"TEXT HERE"},{"resultText":"123"}],"STATUS":"OK","REG":"Y", "Info":{"text":"123","text2":"3","image":"url","id":"12345"}});

The task is to pull this json:
{"DISPUTE_MESSAGE":"Test","results":[{"resultText":"LALALA."},{"resultText":"TEXT HERE"},{"resultText":"123"}],"STATUS":"OK","REG":"Y", "Info":{"text":"123","text2":"3","image":"url","id":"12345"}}
April 3rd 20 at 17:40
3 answers
April 3rd 20 at 17:42
@Charles.Stood, thank you for your interest in my question, however, receive the json parts:

You can make the same regular expression to get the fully json 1? Ideally, to make a reference to "responseJson" - Wilson.Dani commented on April 3rd 20 at 17:45
@Wilson.Dani, - Charles.Sanfor commented on April 3rd 20 at 17:48
@Charles.Stood, not really, but I figured it out myself how to alter this expression and now everything works fine. thank you ;) - Wilson.Dani commented on April 3rd 20 at 17:51
April 3rd 20 at 17:44
After get the innerText of the desired element <script>.
And then or some JParser, or Regular expressions.
@mac.Yost immediately brewing question, if using simple_html_dom we do this:

If 8 script exists then OK, but if the server gave a result with 13 different scripts, then we will receive not what we wish... ? but if the 8th does not exist - catch the error. There are more correct decisions in such cases? - Wilson.Dani commented on April 3rd 20 at 17:47
April 3rd 20 at 17:46
Make a regex for a unique substring DISPUTE_MESSAGE and pit it on the HTML page (not the DOM!).
Use preg_match() to get the desired matches of a substring in the REGEX expression.

Find more questions by tags PHP