title: How to get data from a weather RSS feed using javascript and ajax?
body: <pre><code>$.ajax({ 
      type: 'GET',
      url: 'weatherProxy.php',
      dataType: 'xml',
      success: function (xml){
          titles=this.responseXML.getElementsByTagName('title')
          for(i=0; j &lt;titles.length; i++){
              out+= titles[i].childNodes[0].nodeValue + '&lt;br&gt;'                    
          }
      }
  });
  </code></pre>
  
  <p>weatherProxy.php</p>
  
  <pre><code>if (isset($_GET['http://open.live.bbc.co.uk/weather/feeds/en/2645425/3dayforecast.rss'])){
  header('Content-Type: text/xml');
  echo file_get_contents($_GET['http://open.live.bbc.co.uk/weather/feeds/en/2645425/3dayforecast.rss']);
  </code></pre>
  
  <p>I am trying to take the information from the url through an ajax get request, I pass the rss feed through a proxy to prevent the "No access control allow origin" error. At the moment it doesn't work was wondering if I'm doing something wrong. I need it to add each title on the RSS feed to the array titles.</p>