Issues related to downloading files remotely.

Source: Internet
Author: User
Problems with downloading files remotely ...
I have a remote path
http://www/images/

There are a lot of pictures inside. Want to download down, do not know what is the right way?

No file name: Only path name:

------Solution--------------------
First make sure that the directory is readable
Opendir () after Readdir () then read the following letter
PHP Code
function Grabimage ($url) {if ($url = = ""): return false;endif; $filename = ' qq/'. STRRCHR ($url, "/"); Ob_start (); ReadFile ($ URL); $img = Ob_get_contents (); Ob_end_clean (); $size = strlen ($img); $FP 2= @fopen ($filename, "a"); Fwrite ($fp 2, $img); Fclose ($fp 2); return $filename; }
------Solution--------------------
Explore

If not readable: Is there any way to do it ...

------Solution--------------------
Remote Access http://www/images/

This allows direct access to 90% of the server configuration will tell you the English answer "Access Denied"!

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