Convert url into image


How can I automatically turn an image url into an image. e.g

will become

<img src=“” width=“50” height=“50” />

Where are the image url’s coming from? Are you trying to hotlink to other peoples’ images on other websites?


The images can come from anywhere.
I’m creating a website where users can submit posts. If an image is detected I want it to display the image instead of the url.

If you want to move a copy of an image from one website to another then the file_get_contents or cURL commands
are going to be needed in order to retrieve the picture and then you will need to save it to a folder on your website before the script
posted by mali28 becomes of any use.