Retrieving contents of re-directed url | curl vs. contexts
<p>I'm using file_get_contents as such</p>

<pre><code>file_get_contents( $url1 ).
</code></pre>

<p>However the actual url's contents are coming from  $url2.</p>

<p>Here is a specific case:</p>

<pre><code>$url1 = gmail.com

$url2 = mail.google.com
</code></pre>

<p>I need a way to grab $url2 progrmatically in PHP or JavaScript.</p>
