Anti-Scraper Script: Feed Hooks
-
Hi, I am writing an anti-scraper plugin that essentially runs a few unique tests to determine if a feed visitor is a scraper and, if so, stops the feed output.
However, I cannot seem to get the code to run… The plugin successfully installs when activated, but does not appear to run despite certain hooks being set…
For sake of brevity, I have removed much of the code, but hopefully someone can still point out to me what I have wrong…
function ss_check() {
global $wpdb;
$table_name = $wpdb->prefix . "ss";
code removedif($scraperStatus=='yes') {
die;} else { }
}add_action('do_feed_rss', 'ss_check',1);
add_action('do_feed_rss2', 'ss_check',1);
add_action('do_feed_atom', 'ss_check',1);
add_action('do_feed_rdf', 'ss_check',1);If I want the function to run before the feed is outputted, and want it to kill the feed altogether (ie: do not want it to successfully publish the feed), are those the right hooks to use? If so, why do they not appear to be running at all…
The topic ‘Anti-Scraper Script: Feed Hooks’ is closed to new replies.