SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: Download picture from URL
-
Apr 30, 2006, 23:17 #1
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
-
May 1, 2006, 00:42 #2
- 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
-
May 1, 2006, 01:16 #3
- 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.
-
May 1, 2006, 22:36 #4
thanks, if anyone has anymore suggestions ...
Bookmarks