Hello,
I am interested in snagging a webpage, parsing it, and displaying the results. I
have written the code for this, and it worked on two servers, one running PHP
4.2.2 and one running 4.2.x (not sure which subversion).
Recently, one of the hosts has upgraded to 4.3.0 - most likely on the same day
(I don't get noticed about the upgrade, more's the pity), the script stopped
working.
It still works on the other one.
Now, this is where it gets weird. I use a file("url"), then iterate through the
result array to change it into a long string for parsing. I made it print
sizeof() the array just out of curiosity.
I find that the file() function gets only the first 51 or so lines from this
site. On the site that works, the whole thing is around 500 lines - obviously I
need all of the info to be able to parse it.
Any other page is obtained fine, the full length. I would think the host has
blocked me, but this behavior occurs on YET another site, completely unrelated.
So, are there any limitations in file() that I may not be aware of, particularly
when going from 4.2.x to 4.3.0?
Long winded I know, but the problem's kinda ... gnarly. 🙂
Thanks,
Marcin