2

I understand there are many questions asking how to do this however none seem to cover what I am after.

See url: https://nz.tradevine.com/BlobStorage/GetFullPhoto?photoID=3591090673176038018&organisationID=3468490059683634443

How can I download this image and save as plug.jpg?

I think this might be different than others because it doesn't have for example .jpg at the end of the url? either way I can't get it to download.

Jonny B'Good
  • 105
  • 2
  • 13

1 Answers1

3

You can also do it with below code

<?php

$file = file_get_contents('https://nz.tradevine.com/BlobStorage/GetFullPhoto?photoID=3591090673176038018&organisationID=3468490059683634443');

$myfile = fopen("plug.jpg", "w") or die("Unable to open file!");
fwrite($myfile, $file);
fclose($myfile);

?>

Hope this will help!

Ashok Chandrapal
  • 1,020
  • 7
  • 27