This article mainly introduces the PHP bulk acquisition of all fixed-seed links in the Web page, involving PHP string and file manipulation of the relevant skills, the need for friends can refer to the following
Often download links more time, like once all the links added to Thunderbolt or electric stove, but not in this option, how to do, we are phper ah, this matter difficult to our
And look at the code, of course, you have to change according to the specific circumstances.
<?phpheader ("Content-type:text/html;charset=utf8"); $str = file_get_contents ('./showfile.asp '); $str 1 = ' <a Href= "ed2k"; $str 2 = ' > '; $pos 1 = 0; $pos 2 = 0; $pos 3 = 0; $len = strlen ($str); $ed 2k = "; for ($i =5000; $i < $len;) { $pos 1 = strpos ($str, $str 1, $i) + 9; $pos 2 = Strpos ($str, $str 2, $pos 1)-2; $pos 3 = $pos 2-$pos 1; Indicates that the feature connection has not been present. Discard the Find if ($pos 1 = = 9) {break;} $ed 2k = substr ($str, $pos 1, $pos 3+1). " \ r \ n "; File_put_contents (' D:/log/a.txt ', $ed 2k,file_append); Echo substr ($str, $pos 1, $pos 3+1). '
The above is the whole content of this article, I hope that everyone's study has helped.