SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Non-Member leonte's Avatar
    Join Date
    Jul 2004
    Location
    Dubai
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Download picture from URL

    1. Ok so the user enters the url into the textbox: http://www.gogu.com/picture.jpg and I want to download the picture from that URL to my /pics folder (relative location from this source file). Is there such a function in php?
    2. What is the best method of resizing pictures? with GD lib?
    3. Is there a way to optimize a picture file not to loose quality, but to have a smaller file size?

    Thanks in advance

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    copy() is probably the easiest way to save the file locally.

    im not sure what the best way of resizing while maintaining most of the quality is, although i know you can do it with gd

  3. #3
    SitePoint Addict peterb's Avatar
    Join Date
    Jun 2003
    Location
    Athens, Greece
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have used imagemagick for picture resizing. The quality is pretty much the same as if you were to resize it using something like paint shop pro.
    The problem is if you are doing many images, then the speed of the server will be affected as I have tested it on my test server, a pentium I 200 mhz, and the process definitely slows down.

    As for downloading there are many code examples, try a search 'download'.
    If you are just looking for something pretty simple, the code area has a number of examples too.

  4. #4
    Non-Member leonte's Avatar
    Join Date
    Jul 2004
    Location
    Dubai
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, if anyone has anymore suggestions ...


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
  •