I\'m running a PHP script to grab a web page. It worked fine with many sites, but with one site it fails, returning an error saying \"HTTP/1.1 505 HTTP Version Not Supported\".<
Replace the space in the URL with its percent-encoding:
$page = file_get_contents("http://www.lovelybooks.de/stoebern/empfehlung/romantic%20fantasy/?seite=$i");