function wordstream_update_kwresearch_searches_ratio in WordStream Keyword Tools 7
Same name and namespace in other branches
- 6 wordstream.module \wordstream_update_kwresearch_searches_ratio()
@todo Please document this function.
See also
File
- ./
wordstream.module, line 461
Code
function wordstream_update_kwresearch_searches_ratio() {
if (time() > variable_get('wordstream_kwresearch_searches_ratio_updated', 0) + WORDSTREAM_CACHE_TIME) {
// request ratio from kwresearch server
$apiret = xmlrpc('http://www.leveltendesign.com/xmlrpc.php', 'l10seoapi.searches_ratio', 'wordstream');
//dsm($apiret);
if (is_numeric($apiret) && $apiret > 0) {
variable_set('wordstream_kwresearch_searches_ratio', (double) $apiret);
}
variable_set('wordstream_kwresearch_searches_ratio_updated', time());
}
}