Categories
PHP

rir.li – NO image Hotlinking!

UPDATED on github.

Maybe some of you do remember imgred.com, was a really nice service to make copies of images to avoid making hotlinking to other sites.

Unfortunately the site is no longer available, because of this today I started rir.li

The idea is something like this (example):

You see a really nice picture from a blog:

http://anthonyshort.com.au/images/scaffold-diagram.png

And then you copy paste all the HTML code into your blog. That will cause a hotlinking problem to the owner of the picture, since you are using their hosting.

Normally if you don’t want to do this you need to download the image, upload it and change the code.

With reImgRed you just need to change a bit the code:

http://rir.li/http://anthonyshort.com.au/images/scaffold-diagram.png

To do this I took the old source code of imgred.com and I change a lot of things…I can say that now only keeps the idea…

Differences:

  • No DB needed
  • No counter for each image
  • Lighter script
  • Security updates
  • Easier to configure

Usage: http://rir.li/ + url with an image

Example: https://garridodiaz.com/wp-content/uploads/2009/10/tux.jpg

Supported types: png, gif and jpg

Limitations: Max size of 500Kb and watermark for pictures bigger than 480px

rir.li? Re Img Red, based in the unavailable service imgred.com

Install it in your server:

Version: 1.0

Author: Chema Garrido

License: GPL v3

Support: forum.neo22s.com

Tip:

If you were using imgred.com in your WordPress you can update all the posts you had just using this sql query:

update wp_posts set post_content=REPLACE(post_content,"http://imgred.com/","http://rir.li/")