views:

41

answers:

3

I've got a php rss feed. There's a lot of domains that are using my RSS feed for news. I'd like to be able to track which domains are using my rss feed. I tried using $_SERVER['http_referrer'] to no avail. Any ideas?

+1  A: 

Have you tried your web server logs? You could parse and filter all lines containing/listing access to the resource.

andreas
+3  A: 

$_SERVER["REMOTE_ADDR"] is the best you can do to find out the client's IP address. That is not identical to the domain of the site that a possible bot would be working for, though, and will not tell you in what ways your content is re-used.

One thing you could do is attach a "?from=feed" flag to any links that point to your site from the feed. That way, you could at least tell how many visitors come to your site through your feed. The referer variable will then contain the site the link was published on. This is pretty accurate but of course works only if people click the links.

Pekka
+3  A: 

Perhaps if you link an image in your feeds, the client will load them and then you will have a referer to look for.

You could of course link to a script which doesn't really load a visible image but tracks the traffic

baloo
How can I do that reliably?
Citizen
+1 nice idea! @Citizen "reliably" is a difficult thing in terms of RSS feeds :) But this should be possible, you could even add a tracking ID to your images to see what feeds they get called from. Possibly worth another question of its own.
Pekka