gerkintrigg Posted July 11, 2009 Share Posted July 11, 2009 I have a site that uses an XML feed to get data, and I have managed to do most of what I want, but I am trying to use a script that I previously used for image uploads, but is proving a little tricky to resize from the image on the sender's server. The code I am using refers to an uploaded image, but I changed it to refer to the database that i uploaded all the details to and it doesn't like it very much: $q="SELECT * FROM `feeddata2` ORDER BY `Date` DESC Limit 3"; $sql=mysql_query($q); while ($r=mysql_fetch_array($sql)){ $record_id='1'; if(empty($r['small_photo_URL'])){ if (!empty($r['PhotoURL'])){ // for the main image: $image = new SimpleImage(); $image->load($r['PhotoURL']); $image->resizeToWidth(80); $image->save($root.'news/images/small_'.$record_id.'.jpg'); $my_small_image='news/images/small_'.$record_id.'.jpg'; } } Any ideas? Link to comment https://forums.phpfreaks.com/topic/165585-image-resizing-from-the-web/ Share on other sites More sharing options...
gerkintrigg Posted July 13, 2009 Author Share Posted July 13, 2009 any suggestions at all? Link to comment https://forums.phpfreaks.com/topic/165585-image-resizing-from-the-web/#findComment-874407 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.