Feeds Callback Fetcher

Categories

Component ID

1861072

Component name

Feeds Callback Fetcher

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

1152

Component created

Component changed

Component body

Background

When importing content with Feeds, people uses different URLs.
Those are generated by Views, some others by custom modules.

The problem

It also happend that some of these URLs can be guessed by people and/or search engine.

The questions

How to disable the access to those URLs for the anonymous user and let cron access to them ?

The solution

This module has been created for fixing this.
I needed a way to retrieve informations from URLs, but I didn't want those to be guessable or available to anyone.

How it works ?

This module executes a callback (a function or a method) to get it's content instead of retrieving the content from an URL.

Example of use in a hook_cron():

function hook_cron() {
  //Get the importer
  $source = feeds_source('my_custom_job_importer');

  // Configure the callback
  $fetcher_config['callback'] = '_custom_get_jobs';
  $source->setConfigFor($source->importer->fetcher, $fetcher_config);

  // trigger the importation
  $source->save();
  }

Dependencies