Does anyone have or know of a script that can grab a picture from a url and resize it to a maximum width or height (and optionally then save the newly resized image to a directory while adding the filename to a database)? While I'm at it, is it possible to update two seperate records in the same table in the same query using php/mysql? thanks for any help. justin
Never done it, but I would image using fopensocket of just fopen to the url of the image, save it in tmp dir. Make sure you have GD installed to do resize. You can than store the tmp/picture to a writeable file system or database. Two option to store in the database. You can use Blob(person experience, lost half of my blob on every record), I even went to the OSCON and ask Zach(their main developer) why my blob data is half lost....at the time, not sure so he recommand doing base64 on my binary data and store as text. Second part, are you updating two different information to two diifferent records or are you updating one set of information to two different records? You cannot update two different set of information into two different records. but you can update one set of information to two different records.
Image majick is better than GD library from our experience, combine that with "WGET http://domain.com/imagename.xxx" to grab your file (linux) and you are sorted. I think you can even get WGET for windows too.