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\".<
I see you're using a space in your URL. That won't work To solve the problem I would put the url in another variable and encode it like so:
$URL = urlencode("http://www.lovelybooks.de/stoebern/empfehlung/romantic fantasy/?seite=".$i);
file_get_contents($URL);
Replace the space in the URL with its percent-encoding:
$page = file_get_contents("http://www.lovelybooks.de/stoebern/empfehlung/romantic%20fantasy/?seite=$i");