I have a script that reads RSS feeds using fopen & fgets.
When trying to the feed at: http://rss.fok.nl/feeds/nieuws my script hangs until the max_timeout of the PHP is reached.
The thing is:
- it worked perfectly (on the same url) until today.
- it still works on my development mac MAMP server.
- it doesn’t work on the production WAMP server (php 5.2.8)
I tried fread with no success.
any ideas?
Well, it’s more of a workaround than an answer, but I had to resort to it. I used the following to switch over to curl, using this function:
I found it here: http://il.php.net/manual/en/function.file-get-contents.php
btw, in case anyone wants to dig deeper, according to other reports of fgets hanging, it seems it has something to do with the ‘feof’ or lack thereof…