Answer the question
In order to leave comments, you need to log in
How to download a large number of photos from a donor site with links to them?
There is a file with links (photos), about 4k. Do they all need to be downloaded? Manually this is generally nonsense) How to automate the process?
Answer the question
In order to leave comments, you need to log in
than
wget https://ya.ru/111.jpeg
it is possible through curl, but as a rule, wget is already available and curl must be installed.
How to download, a list in a file
How to insert in puff
Is this a large number? That's 15 million - big! (it was the case)
So you can:
<?php
$urls = [
'http://foto.com/1.jpg',
'http://foto.com/2.jpg',
//...
];
foreach ($urls as $i => $url) {
file_put_contents(__DIR__ . "/{$i}.jpg", file_get_contents($url));
}
echo "OK\n";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question