PDA

View Full Version : copying images into database



Blue Cat Buxton
07-08-2004, 04:43 AM
Im a little stuck.

I am trying to implement a sore from a data feed. That is ok, but the company does not want the product images linked directly from their site (as you can do with Amazon).

I have the url's for the images though (in a database) and they don't mind me copying the images and linking to them from my site.

Is there an easy way with PHP to copy an image at a url onto my site?

Thanks

tomek
07-08-2004, 05:43 AM
http://www.php.net/fopen

I think that's what you need (not sure though)

Chris
07-08-2004, 06:31 AM
You could print out the images as links to an html file then run wget (a linux program) on the file. It would fetch all the images.

tomek
07-08-2004, 07:44 AM
this might be usefull:
http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html

Blue Cat Buxton
07-08-2004, 08:03 AM
Thanks Chris - wget will do nicely