Page 1 of 1

Snoopy, Fsockopen, Win98 and timeouts

Posted: Tue Jul 08, 2003 6:13 am
by code_monkey
Hi,

I'm having an odd problem with a script I developed that fetches a seris of webpages. Originally it was running on a *NIX box and seemed to function fine, however recently I transfered it to another machine (win98) due to bandwidth issues. Everytime it runs now it only returns about half a page, however I get no kind of timeout error messages or anything.

My first thoughts were that this was due to a setting somewhere in either the class I was using or in my php setup. I have tried changing all of the timeout values but to no effect. The only way I have found to even get slight results is to go back to the PHP file functions and read the pages in a line at a time, however this is a problem since not all of the pages I want to read can be accessed in this way.

I'm using the latest version of PHP (4.3) and the latest version of the Snoopy class (http://sourceforge.net/projects/snoopy/) for this script on my win98 machine.

The snoopy class appears to use fsockopen to connect to the webpages in order to read in the data.

The real question I was hoping to get an answer to is if anyone knows of any reason why this would happen, since it seems to not be the timeout or php settings, and I'm doubtful that the machine I've put it on is the cause. If anyone has an experience of similar problems to this and has any helpful info I'd love to know. The only solution to the problem I have at the moment is to move the script back to the *NIX box, and that defeats the point of transfering it in the first place!