Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to know who has subscribed to my RSS?

Tags:

php

rss

is there any PHP script or other software that could let me know who has subscribed to my RSS feeds? (server part or personal-browser/RSS-reader)

My RSS files are all generated by a PHP script, then I use an .htaccess URL rewrite rule in order to make the file accessible as .xml.

I know some methods like $_SERVER['HTTP_REFERER'], but I have no confidence to write some reliable code by myself. So, I am looking for some stable code which could help me know who has subscribed to my RSS feeds (and store it into MySQL)?

like image 340
fish man Avatar asked Oct 01 '22 07:10

fish man


1 Answers

Two options for tracking RSS feed subscriptions

–a simple, non-technical explanation of your options

Website log files

If you have access to your website’s log files and know what you are looking for, you could go through it to see how many times your RSS feed was requested. A request for my RSS feed by my computer looked like this:

65.13.85.140 – - [18/Feb/2010:04:40:28 -0500] “GET /?feed=rss2 HTTP/1.1″ 304 159 “-” “Apple-PubSub/65.11″

This could be quite time consuming. I have a new log file generated each day; however, that is a configuration I set up. The default configuration for my website host was one log file. That could be quite cumbersome to count, and if your site gets a lot of traffic almost impossible. You web server may have some basic statistics that will log an xml request. If your site has a static page for it’s RSS, you may be able to locate how many times it is requested by finding its filename. This will not work, however, if you are using a statistic service like Google Analytics because you cannot put Javascript code in your RSS feed’s xml file.

Use transparent png “bugs”

You can use a uniquely named transparent 1×1 png file and add it to the description field of an RSS feed. Then using your website logs (see option one) see the number of times the image is viewed and determine the number of times the feed was accessed. Again, like option number one, not very effective for basically all the same reasons. Furthermore, depending on your how your RSS feed is generated and how you implement the the png bug; it could totally give you the wrong stats and impressions: you may think your feed is a hit when actually the counts are for every view of your post–just depends.

like image 54
teralion Avatar answered Oct 13 '22 01:10

teralion