Detect each active instance of a widget

I would suggest looking at using transients for your data.
Using transients would also take care of needing to use cron to update the data.

Transients are an under utilised function of WordPress and can save considerable loads on resources as sites get busier.

Vee

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)