All images downloaded in batches are 0 bytes PHPcode & lt ;? Php $ conn = mysql_connect (& quot; 127.0.0.1 & quot;, & quot; root & quot;, & quot; 123456 & quot;) ordie (& quot; images that cannot be connected to data for batch download are 0 bytes
PHP code
The thumb in the table is the path of the collected remote image.
The image downloaded using this function is 0 bytes.
------ Solution --------------------
While is too fast. just sleep.
------ Solution --------------------
Let's take a look at one or two images and check whether the getImage () results are output in your code.
PHP code
$ Result = mysql_query ("SELECT itemid, thumb FROM table LIMIT 0, 1"); while ($ row = mysql_fetch_array ($ result )) {echo getImage ($ row ["thumb"], "")."
"; Echo $ row [" itemid "]." output successful
";}
------ Solution --------------------
File_get_content file_put_content