title: forward a url using php dynamically using curl
body: <p>im using a url to download a file.
  <br/>
  for example<br/>
  This url is downloading file<br/>
  url:www.abc.com/get.php?file=1
  <br/>
  how to redirect the same url to another side like xyz.com<br/>
  url:www.xyz.com/get.php?file=1<br/>
  im using this way but its not execuiting and downloading the file from new url<br/><br/></p>
  
  <pre><code>$url="www.abc.com/get.php?file=1";
  
  $url=str_replace("abc","xyz",$url);
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_HEADER, 0);    
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  curl_exec($ch);
  curl_close($ch);
  </code></pre>