Jump to content

Resize images


jurass1c

Recommended Posts

I have been searching for a straight forward script that will allow me to resize images from a URL.

 

The images are hosted on various websites and the link to this images are stored in my database.I dont have the images stored or located in my directory so most script i have found are pretty much useless. What would be the best method to resize from a indexed URL without using the HTML method. Also Exactly how hard is it to resize and save an image to a folder in my directory from a URL in my database?

Link to comment
https://forums.phpfreaks.com/topic/203515-resize-images/
Share on other sites

This (modify as needed) will get the image and store it on your server, then you can use a simple resizing script to resize.

 

<?php
$image_get = "http://www.39dollarglasses.com/store/images/thumb/2164_Brown.jpg";
$image_save = "some_name.jpg";
$i = file_get_contents($image_get);
$f = fopen($image_save,'w+');
fwrite($f,$i);
fclose($f);
?> 

Link to comment
https://forums.phpfreaks.com/topic/203515-resize-images/#findComment-1066160
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.