How to get all fixed seed links in a Web page in bulk by PHP

Source: Internet
Author: User
The example in this paper describes how to get all the fixed seed links in a Web page in bulk by PHP. Share to everyone for your reference, as follows:

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). '  
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.