Good people, I just want to remotely get the file on the mask from the server and save it to my folder. Everything before ... small.jpg changes every 3 days, the path does not change

$url = "http://somefile.ru/uploads/image/bnr/iuni17813small.jpg"; $dir = __DIR__ . "/subfolder"; $file = file_get_contents($url); file_put_contents("/subfolder/my_superfile.jpg", $file); 

And could I do something like that?

 <img src="http://somefile.ru/uploads/image/bnr/[mask]small.jpg" 

Thank you very much! The main thing is that the working version.

  • No The http protocol allows you to work only with fully specified file names. Unless, of course, there is any list of files from which one could get the required name - Mike
  • @Mike It is a pity that this is the case: - ((((((( - - BufferOverrun

0