I was hunting down a little hang I was getting (for a site I had done for work) when rsslib is grabbing the remote rdf file (anytime it has to refresh it’s cache). The hang seemed longer than it should be, but in any case, it only happens when it needs to remotely pull the file. My original approach to trying to get rid of this hang was to display the old file and then call the refreshing getrdf() function. Unfortunately, that was still hanging the end of the page, so I moved the function call to the end of the page. Unfortunately, there doesn’t seem to be a way in PHP for a script to close the HTTP connection to the client but still continue processing. Without that option, I started working on calling the the refresh functions in a seperate file. I just wanted to do a simple touch. I started working with the CURL functions, but that ended up being too much of a pain, then tried fopen(), which gave the same execution blocking problem (since it had to wait for the refreshes to finish for the connection to complete, and then the socket functions – which weren’t working on the build of PHP I’m working on at work (Mark Liyanage’s OSX binary). I finally ended up trying out fsockopen(), which ended up working. The end solution of course totals to 3 lines of code (opening the socket, sending a GET string, and closing the socket). But it took me a damn long time to get such a simple thing working. Well, now I know I guess.