title: Not sure why getting the last url for a redirect using CURL is working locally but not on production server
body: <p>Hoping someone can point me in the right direction.  I have a URL that redirects to a media file. That is the information I am trying to retrieve. (The host and the path of the actual file). </p>
  
  <p>Using this code</p>
  
  <pre><code>&lt;?php 
  $url='http://urs.pbs.org/redirect/71201be9214242cbbc32633826f8092b';
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_HEADER, TRUE);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  curl_exec($ch);
  $newurl=curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
  $p = parse_url($newurl) ;
  $rtmp=$p['scheme']."://".$p['host'];
  $episode=$p['path'];
  echo $rtmp.'&lt;BR&gt;';
  echo $episode.'&lt;BR&gt;';
  ?&gt;
  </code></pre>
  
  <p>Locally, it works fine.  But on my production server is just kicks back the $url. </p>
  
  <p>It prints out 
  <a href="http://urs.pbs.org" rel="nofollow">http://urs.pbs.org</a>
  /redirect/71201be9214242cbbc3233826f8092b</p>
  
  <p>Also, I should point out that <strong>CURL is installed on the production server</strong> and working fine.  I am not getting any errors. </p>
  
  <p>Any help appreciated.</p>