title: Remotely get soundcloud ID using DOM
body: <p>I want to embed soundcloud by it's url
  <a href="http://soundcloud.com/oembed?url=http://soundcloud.com/kiwinest/linkin-park-iridescent" rel="nofollow">http://soundcloud.com/oembed?url=http://soundcloud.com/kiwinest/linkin-park-iridescent</a>
  this url gives <strong>every detail of sound file including html embed codes
  so i just want to want to remove all codes and want sound id that is 17181143</strong>
  I'm using this code </p>
  
  <pre><code>&lt;?php
  include('lib/simple_html_dom.php');
  
  $html = file_get_html('http://soundcloud.com/oembed?url=http://soundcloud.com/kiwinest/linkin-park-iridescent');
  
  if ($html) {
      foreach ($html-&gt;find('object') as $obj) {
          foreach ($obj-&gt;find('param') as $par) {
              if ($par-&gt;name == 'movie') {
                  $embed = parse_url($par-&gt;value);
                  parse_str(urldecode($embed['query']), $val);
                  if (array_key_exists('url', $val)) {
                      $url = parse_url($val['url']);
                      $path = explode('/', $url['path']);
                      $code = array_pop($path);
                      if (is_numeric($code)) {
                          echo 'CODE: ' . $code . PHP_EOL;
                      }
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>BUT THIS WILL GIVE OUTPUT NOTHING..!! (blank)</p>