Is there a way of downloading external image to my site auto

Started by promonkey, April 01, 2012, 01:37:12 PM

Previous topic - Next topic

promonkey

Hay, hope im describing the properly but when somone posts an image onto my site

from say www.external image host.com /image.gif

and the poster puts the usal img tags ect

is it possible for the image to be downloaded so it becomes www.my site url.com /image.gif


Thanks
Checkout My Forum: www.TalkAppliance.Co.Uk

MrPhil

A poster can always use the image tag: [img]http://externalsite.com/image.gif[/img]. That should fetch the image from the external site and display it on the browser. This will show the other site's address, if anyone cares to look at the image properties, or look at the image link. If that's what you're trying to avoid showing (make it look like it's coming from your site), that might be possible. You'd have the post's link contain your site, and catch the reference in your .htaccess file and URL Redirect it to the foreign site. I haven't tried this, so I don't know which address will show up in the image properties (the link itself should look like it's your site).

Note that any of this is considered (at best) "hot linking", and costs the other site money (bandwidth, CPU cycles, disk storage, etc.) to serve images for you. They may not appreciate it, if you or your users are freeloading off them, unless such image repositories are their primary business. The alternative is to save the image on to your PC and upload it to your site, but make sure you're not violating copyright laws (i.e., the other site licenses you to use their images).

promonkey

thanks for your answer, this is me probibly day dreaming but im sure there was a mod at one time that when somone posted a image with thte tags it uploaded it to my host and displayed it from there?


Im just tryign to save hotlinking as you say as i will be using alot of images from a spares company.

Thanks
Checkout My Forum: www.TalkAppliance.Co.Uk

MrPhil

I'm sure such a tag could be written to automatically move used images to your server, but I would think it would be a copyright infringement nightmare. If you're the only one authorized to use these tags, I suppose you could control which sites you're taking images from, and presumably have permission to do so on. There might even be a list of allowed image source sites that you could take from, so that anyone could post this way. In that case, you might have several new BBCode tags, one for each source (where only the file name has to be entered... the rest is canned).

If members posting have to know the external site anyway, and enter the image URL, what would be the point? You might essentially be caching images on your site, which would reduce hotlinking, but there is still the copyright issue. The server would have to look in the database for whether this image is cached on the server, grab a copy if it isn't, and generate an <img> tag for the local URL. Unless you publish a list of what images are available locally, so that members can use ordinary image BBCode with local URLs, no one would know that the image is available locally (saving them some typing).

An interesting problem. I think I see where you're trying to go, but there are potentially a lot of problems.

Advertisement: