I am getting image from API without Extension.
How can I convert that to .jpg or .png in php?
For example: http://s7.asdcASD/is/image/SDCsaAS/59567_67106_MAIN
The last parameter is image name but without extension.
I am getting image from API without Extension.
How can I convert that to .jpg or .png in php?
For example: http://s7.asdcASD/is/image/SDCsaAS/59567_67106_MAIN
The last parameter is image name but without extension.
If you are trying to save the image on disk and then open it, try to concat your string with the extension before saving.
E.g
<?php
$a = "59567_67106_MAIN";
$b = $a . ".jpg";
?>