PHP fastest method of reading server response
- by Peter John
Hi there, im having some real problems with the lag produced by using fgets to grab the server's response to some batch database calls im making.
Im sending through a batch of say, 10,000 calls and ive tracked the lag down to fgets causing the hold up in the speed of my application as the response for each call needs to be grabbed.
I have found this thread http://bugs.php.net/bug.php?id=32806 which explains the problem quite well, but hes reading a file, not a server response so fread could be a bit tricky as i could get part of the next line, and extra stuff which i dont want.
Any help much appreciated!