url = http://www.homegate.ch/mieten/immobilie-suchen
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:
echo file_get_contents('http://www.homegate.ch/mieten/immobilie-suchen');
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?
hope you can help me, thanks!