Mobile app version of vmapp.org
Login or Join
Nimeshi995

: Pingback / trackback support for a photo sharing website? 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

@Nimeshi995

Posted in: #Backlinks #Blog #PhotoGallery

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

1 Comments

Sorted by latest first Latest Oldest Best

 

@Murphy175

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=. [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):

<?php
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']."' ) ";
mysql_query($query);

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme