Hello!
There is a script that copies the image using the http protocol. Copying is done by the copy function.
Faced with the fact that from time to time the image is copied, but not completely. Not completely - this means that, for example, if you look at the copied image in the browser, it will be shown in half.
I tried to check the image for validity through getimagesize , but this feature shows that everything is in order. That is, the file header is fine.
It seems that the remote server sometimes just breaks the connection, so the first part of the file is correct, with all the headers, and then the file stops unexpectedly.
We correspond with the administrator of the remote server, but so far to no avail, he claims that the server gives the file completely, without errors.
But in fact the images are saved incorrectly.
How can PCP check that the file is copied completely, without errors? What file is a valid image?
The source file is 100% correct, it can be seen in the same browser, if you look at the source file.
The difficulty is that it happens regularly, but rarely. When I check the script with my eyes, out of about 30 runs, the image loaded incorrectly once. That is, debugging capabilities are very limited, unfortunately.
And there are several tens of thousands of files, some of which are incorrect. How to find them?
Thank.
Content-Lengthand reality after downloading. Do not match - restart. - user207618crc32. - user207618