As a senior and professional Skinner personnel, I began to invest in the great Internet from the beginning to now accumulated a wealth of Skinner experience. I'm sure every web programmer will have a similar experience. In the Skinner process, it is essential to download the pictures in the style file. When you encounter a larger style file, which may have hundreds of pictures to download, it is most appropriate to use this small piece of code below.
As a senior and professional Skinner personnel, I began to invest in the great Internet from the beginning to now accumulated a wealth of Skinner experience. I'm sure every Web programmer will have a similar experience.
In the Skinner process, it is essential to download the pictures in the style file. When you encounter a larger style file, which may have hundreds of pictures to download, it is most appropriate to use this small piece of code below.
< PHP/* more & Original php framwork Copyright (c) 2007-2008 Ismole Inc. Author:kimi Documentation: Download the picture in the style file, water dedicated Skinner tool * *//note set the PHP timeout set_time_limit (0); Note To get the content of the style file $styleFileContent = file_get_contents (' images/style.css '); The note matches the URL address that needs to be downloaded Preg_match_all ("/url\ (. *) \)/", $styleFileContent, $imagesURLArray); Note Cycle need to download the address, download $imagesURLArray = Array_unique ($imagesURLArray [1]); foreach ($imagesURLArray as $imagesURL) {file_put_contents (basename ($imagesURL), file_get_contents ($imagesURL)); }
Finally wish you in the process of Skinner, a chop to the end!