title: Extract JS Values from Remote HTML in PHP | Scraping
body: <p>I am making a dashboard for myself where I want to see the number of times an item has been downloaded from a particular site that displays this information on its site. It displays the information in graph form by using Google API, so the values are inside a <code>&lt;script&gt;</code> tag.</p>
  
  <p>It looks like this</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
  &lt;!--   ...somehtml    --&gt;
       &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
          &lt;script type="text/javascript"&gt;
            google.load("visualization", "1", {packages:["corechart"]});
            google.setOnLoadCallback(drawChart);
            function drawChart() {
              var data = new google.visualization.DataTable();
              data.addColumn('string', 'Date');
              data.addColumn('number', 'Uses');
      data.addRows([['9 May', 1],['22 May', 14],['23 May', 27],['24 May', 23],['25 May', 5],['26 May', 10],['27 May', 20],['28 May', 14],['29 May', 9],['30 May', 8],['31 May', 3],['1 Jun', 2],['2 Jun', 4],['4 Jun', 4],['5 Jun', 2],['6 Jun', 4],['7 Jun', 6],['8 Jun', 7],['9 Jun', 9],['10 Jun', 14],['11 Jun', 6],['12 Jun', 8],['13 Jun', 14],['14 Jun', 13],['15 Jun', 13],['16 Jun', 19],['17 Jun', 4],['18 Jun', 4],['19 Jun', 3],['20 Jun', 1],['22 Jun', 3],['23 Jun', 10],['24 Jun', 3],['25 Jun', 8],['26 Jun', 5],['27 Jun', 10],['28 Jun', 45],['29 Jun', 23]]);        
      var options = {
                width: 277, height: 136,
                title: 'Usage Statistics This Month',
                titlePosition: 'none',
                legend: {position:'none'},
                chartArea: {left:0, top:24, width:277, height: 110},
                hAxis: {textPosition: 'none'}, vAxis: {textPosition: 'in'}
              };
  
              var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
              chart.draw(data, options);
            }
          &lt;/script&gt;
  ...somehtml    
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The data I want is the one after "data.addRows". I am new to scraping so I couldn't find a way to do this. I wonder if I can get the values stored in an array of this format:</p>
  
  <p><strong>Example :</strong></p>
  
  <p>For -> ['9 May', 1]</p>
  
  <p>I need it to be in the array with <strong>'23 Jun' as the key</strong> and <strong>10 as value</strong></p>