create image resource [solved]

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
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

create image resource [solved]

Post by s.dot »

How do I create an image resource from a url to an image.. so that i can save it on the filesystem using imagejpeg()?

IE:

Code: Select all

$url_to_image = 'http://www.example.com/example-image.jpg';
//do something here
imagejpeg($image_resource, '/home/me/public_html/images/example-image.jpg');
Last edited by s.dot on Tue Feb 20, 2007 2:58 pm, edited 1 time in total.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

got it..

imagecreatefromjpeg($url_to_image);

sorry.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply