I have say 5 URLs of five images available from Google search. Now I wish to download them on client side. Any way to do it using PHP ?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
No. PHP doesn't download to clients. The client (i.e. a browser) can download from a server, and the server may use PHP to send the data.
[edit]
To send a single image, you must set the right header, to specifiy the content type of the image. See http://www.ehow.com/how_7280601_send-php-image-file.html
To send multiple images, you could send a multipart response. Unfortunately support for this type of response is poor. Don't use it.
Or you can just send a html page with
<img>
tags in it. The url of the image can be a direct file location, or a PHP script that sends a single image, like in 1.