[SOLVED] Fetch image from URL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mazmanr
Forum Newbie
Posts: 3
Joined: Wed Aug 04, 2004 11:21 am

Fetch image from URL

Post by mazmanr »

Hello all,

I had a question regarding images and fetching them from a remote server. I have a JPG image that resides on a remote server and I"m trying to grab it & make a thumbnail of it & such. I was wondering if its possible to even do this, and if so, how would I go about it?


I already have the thumbnailing part done, there's no problem there, the only problem is fetching the image.


Thanks.
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

Yea it's possible.

If your using gd you can pass the url to imagecreatefromjpeg() and things should work.

Code: Select all

$im = imagecreatefromjpeg("url");
mazmanr
Forum Newbie
Posts: 3
Joined: Wed Aug 04, 2004 11:21 am

Post by mazmanr »

Interesting...That's what i thought it was but I heard somewhere that it doesn't work.


I'll give it a shot & I'll get back to you. THanks.
mazmanr
Forum Newbie
Posts: 3
Joined: Wed Aug 04, 2004 11:21 am

Post by mazmanr »

Just an update. I got it to work just fine :) Simple stuff.


Thanks again nigma.
Post Reply