Auto Crop Images From Source URL?

admin

Administrator
Staff member
Firstly, I do have permission to do this from the site admin.<br /><br />My Site: Here<br />Source Image: Here<br /><br />The weather image style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />. I would of course learn from it at the end of the day!<br /><br />I have found the following php codes, however I am unsure how to edit them to my needs:<br /><br />Crop Image 1<br />Crop Image 2<br />Crop Image 3<!--content-->
If you use the function from <!-- m --><a class="postlink" href="http://www.findmotive.com/2006/12/13/php-crop-image/">http://www.findmotive.com/2006/12/13/php-crop-image/</a><!-- m --> I think you should be able to do something like this:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (copy(http://www.burghfieldsailing.org/weather/summary.gif), 'localpath/temp.gif')<br />{<br />  cropImage(225, 165, 'localpath/temp.gif', 'gif', '/path/to/dest/summary.gif');<br />}<br />else<br />{<br />  //return some error message or display a default image<br />}<!--c2--></div><!--ec2--><br /><br />This assumes your PHP installation has 'fopen wrappers' enabled.<!--content-->
 
Top