title: How to pull data from HTML
body: <p>I am trying to write a PHP Script to pull snow and other data from <a href="http://www.snowbird.com/mountain-report" rel="nofollow noreferrer">http://www.snowbird.com/mountain-report</a> to display via an LED array. I am having troubles with getting the data I need. I can't seem to be able to find a way to make it work. I've read about PHP not being the best tool for this? Would I be able to make this work, or would I have to go about and use a different language? Here is the code I cant seem to get working.</p>
  
  <pre><code>&lt;?php
  include_once('simple_html_dom.php');
  
  
  // create curl resource
  $ch = curl_init();
  // set url
  curl_setopt($ch, CURLOPT_URL, "http://www.snowbird.com/mountain-report/");
  //return the transfer as a string
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  // $output contains the output string
  $output = curl_exec($ch);
  // close curl resource to free up system resources
  curl_close($ch);
  
  
  $output = ($output);
  
  $html = new DOMDocument();
  $html = loadhtml( $content);
  
  $ret1 = $html-&gt;find('div[id=twelve-hour]');
  print_r ($ret1);
  $ret2 = $html-&gt;find('#twenty-four-hour');
  print_r ($ret2);
  $ret3 = $html-&gt;find('#forty-eight-hour');
  print_r ($ret3);
  $ret4 = $html-&gt;find('#current-depth');
  print_r ($ret4);
  $ret5 = $html-&gt;find('#year-to-date');
  print_r ($ret5);
  ?&gt;
  </code></pre>