title: ASP.NET equivalent of this PHP code?
body: <p>We have a flash developer who uses calls a file called proxy.php with the querystring ?url="http://feedburner/whatever" to access external data from rss feeds from domains that not by default accessible from swf code. for example I could have the following in the browser: <a href="http://localhost/proxy.php?url=feedburner.com/a_feed" rel="nofollow noreferrer">http://localhost/proxy.php?url=feedburner.com/a_feed</a> and the browser would display the page as if I'd put the feedburner url directly in the browser address bar.   The PHP code in this proxy.php file is below. </p>
  
  <pre><code>$header[] = "Content-type: text/xml";
  $header[] = "Content-length: ".strlen($post_data);
  
  $ch = curl_init( $_GET['url'] ); 
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_TIMEOUT, 10);
  curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  
  if ( strlen($post_data)&gt;0 ){
      curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
  }
  
  $response = curl_exec($ch);     
  
  if (curl_errno($ch)) {
      print curl_error($ch);
  } else {
      curl_close($ch);
      //$response=split("iso-8859-2",$response);
      //$response=join("UTF-8",$response);
      print $response;
  }
  </code></pre>
  
  <p>It works fine but because of hosting limitations we need to replicate the functionality in asp.net. I don't know PHP and despite efforts to understand the code I am failing miserably. I need to be able the duplicate the functionality I described in the first paragraph with asp.net but despite googling and trying a technique with XmlTextWriter inside a ashx file I have failed. What am I missing here? </p>
  
  <p>I'm guessing a response.redirect would not work as it tells the source to go to the external domain itself and we want to avoid that. </p>
  
  <p>How would I achieve this PHP code functionality in ASP.NET?</p>