Would you like to download a file in a folder that specifies a Web site that you can implement in PHP?

Source: Internet
Author: User
Find a station on the file storage Cdn, and the store is relatively regular.
For example, files under the Musicx folder:
Http://cdn.baidu.com/musicX/01.img or Http://cdn.baidu.com/musicX/1.img
Http://cdn.baidu.com/musicX/02.img or Http://cdn.baidu.com/musicX/2.img
......
Http://cdn.baidu.com/musicX/20.img or Http://cdn.baidu.com/musicX/20.img
(the "X" above represents 1-1000 of the different folder names Images1, images2~images1000. )

Now I want to enter or select the drop-down folder name in the PHP page input box to display all the file names and paths under the corresponding folders on the Web page, and click to implement the download.

Please enlighten the great god, thank you very much!

=====================================================================
Thanks for the reply, the problem has been basically solved.
Idea: Phpquery Gets the keyword, deposits the array, the Foreach loop reads, and curl determines whether the file exists, echo all the file addresses.

Reply content:

Find a station on the file storage Cdn, and the store is relatively regular.
For example, files under the Musicx folder:
Http://cdn.baidu.com/musicX/01.img or Http://cdn.baidu.com/musicX/1.img
Http://cdn.baidu.com/musicX/02.img or Http://cdn.baidu.com/musicX/2.img
......
Http://cdn.baidu.com/musicX/20.img or Http://cdn.baidu.com/musicX/20.img
(the "X" above represents 1-1000 of the different folder names Images1, images2~images1000. )

Now I want to enter or select the drop-down folder name in the PHP page input box to display all the file names and paths under the corresponding folders on the Web page, and click to implement the download.

Please enlighten the great god, thank you very much!

=====================================================================
Thanks for the reply, the problem has been basically solved.
Idea: Phpquery Gets the keyword, deposits the array, the Foreach loop reads, and curl determines whether the file exists, echo all the file addresses.

You can Baidu under
Phpquery, Snoopy these two libraries, combined with a few lines of code will be done

  • 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.