SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: convert url into image

  1. #1
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    236
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    convert url into image

    Hello,

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

    www.website.com/image.jpg

    will become

    <img src="www.website.com/image.jpg" width="50" height="50" />

  2. #2
    Non-Member Max Height's Avatar
    Join Date
    Dec 2011
    Posts
    303
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Where are the image url's coming from? Are you trying to hotlink to other peoples' images on other websites?

  3. #3
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    236
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello.

    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.

  4. #4
    SitePoint Zealot Sogo7's Avatar
    Join Date
    May 2011
    Posts
    124
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •