0

I have url:

http://website.com/image?id=56456465456464

and when I go there I see image with custom name, for example "KLR8asDTYPQQQs6.jpg" So how to get that image name?

I have a function to copy it to my server, but I need to get the name of it first..

copy('http://website.com/image?id=56456465456464', 'uploads/'.img_name???.'.'.img_ext???);
  • I guess you can't, the name "KLR8asDTYPQQQs6.jpg" is just the name in temporary storage, so you would better generate a new uniqueid for the image name: http://www.php.net/manual/de/function.uniqid.php – ReeCube Feb 28 '14 at 13:32
  • no no, the name is not temporary. I need a name and example :| unique ID is not a solution for me – Žydrius Nežydras Feb 28 '14 at 13:33
  • How/why do you know that "KLR8asDTYPQQQs6.jpg" is not temporary? And from where do you have the information about this name? – ReeCube Feb 28 '14 at 13:37
  • this is the name of the images from my project I sold few months ago, now I want to scrap all info from it (its legal, becouse we made a deal with buyer that he will give me a copy a DB but he ignore me now) and I know that these name are not temporary – Žydrius Nežydras Feb 28 '14 at 14:00
  • So the name is not temporary but the name is on his server and you have no access on his server so there is no chance to get the name of the image, sorry – ReeCube Feb 28 '14 at 14:02
  • 1
    take a look at http://stackoverflow.com/questions/724391/saving-image-from-php-url-using-php – Sean Feb 28 '14 at 14:07
  • this is not the option, like as I said - I do not know the name of the image – Žydrius Nežydras Mar 04 '14 at 16:15

0 Answers0