1

I'm currently having problem on how to access an image from a different FTP server then use it as

<img src = 'Path from different server'>

Currently here is the result I've got from searching

<img src="ftp://username:password@my_ftp_ip_address/Images/imagename.jpg"/>

But I wouldn't want anybody to view my login credentials on FTP. Is there any other way to do it or just hide the login credentials with the method above?

PS I'm using PHP and Linux as a file server.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
user3235016
  • 317
  • 2
  • 11
  • It is. But the method depends on your situation. Is webserver software installed on the fileserver? If yes: use CORS. If no: Use Ajax. Let PHP retrieve the image serverside so no one sees your credentials – icecub Oct 24 '17 at 03:25
  • If I use ajax then use inspect element that would make me see the path of the image. How do I hide/mask that part? – user3235016 Oct 24 '17 at 06:10

0 Answers0