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.

1

1 Answer 1

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!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.