Is there a photo sharing service, such as flickr or picasa, that will collect the urls of the locations where the photo has been posted on other blogs (or mentioned in tweets, etc?)

This could be accomplished by posting each photo as a blog entry using wordpress, which would then automatically handle pingbacks, but of course a blog doesn't perform quite like a proper photo service.

Perhaps this could be done with a private photo hosting server like zenphoto by editing the php, but that seems rather involved.

Does such a service already exist?

  • what's wrong with wordpress? there are plenty of good photo blog themes for wordpress out there.
    – user6901
    Feb 13, 2012 at 22:51
  • Ha, good question. Wordpress will only capture the pingback if someone links the post. if someone links/embeds the photo itself I get no ping-back record.
    – cboettig
    Feb 15, 2012 at 17:44
  • You might want to ask on wordpress.se how to enable this.
    – user6901
    Feb 15, 2012 at 21:45
  • A solution will probably involve logging the referrer http data for that image file.
    – user6901
    Mar 3, 2012 at 16:48
  • Are you doing this for copyright control purposes, or just to see how many links there are to your image? Apr 3, 2012 at 13:30

1 Answer 1


I'm not sure about a photo sharing service, but I have an idea of how you can track where your images are embedded with some PHP. You could probably build this in to WordPress somehow as well if you know what you're doing. I believe this could work.

In your .htaccess file put a rule something like this:

RewriteCond %{HTTP_REFERER} !^http://([-a-z0-9]+\.)?yourdomain\.com [NC]
RewriteCond %{QUERY_STRING} !^pass=1$ [NC]
RewriteRule ^(.*)\.(gif|jpe?g|png|bmp|swf)$ /hotlink.php?url=$1.$2 [R,NC,L]

This will re-write all requests for images on your site, that don't come from your domain, to a file called hotlink.php with the address for the image they were accessing contained in the 'url' variable.

Now in the hotlink.php file you can sort of do what you want. You can log the referrer and serve the image anyways, which would still allow your picture to be embedded in other sites, you can block certain sites from using your images but allow others, or you can block other sites from using your images at all.

So if all you want to do is track the referring URL's you could put something like this in your hotlink.php file that all image requests are redirected through (untested):

mysql_connect("localhost", "admin", "1admin") or die(mysql_error());
mysql_select_db("link_track") or die(mysql_error());

$query = "INSERT INTO image_tracking (img_url, date, referrer) VALUES('".$_GET["url"]."', '".date(DATE_RFC822)."', '".$_SERVER['HTTP_REFERER']."' ) ";

header("Location: ".$url."?pass=1");

This would take the url of the image that is being accessed and record it in a MySql database with the date and the referring url. It would then serve up the image that was being requested so the people embedding your images wouldn't even notice the difference. With the information in a database you could access the info however you wanted, through a custom php page, through something like phpMyAdmin, or by adding a page to the admin area of the blog software you are currently using.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.