php file_get_contents with javascript redirect
<p>url = <a href="http://www.homegate.ch/mieten/immobilie-suchen" rel="nofollow">http://www.homegate.ch/mieten/immobilie-suchen</a></p>

<p>can someone explain to me the following: when i request the url in my browser, there is no problem (everything works fine). but if i request the url with PHP's file_get_contents, there is a redirect loop:</p>

<pre><code>echo file_get_contents('http://www.homegate.ch/mieten/immobilie-suchen');
</code></pre>

<p>I figured out, that this loop is done by JS, but i've no idea how to solve this with PHP. should i use curl instead? but how can i follow this redirection which is done by javascript?</p>

<p>hope you can help me, thanks!</p>
