function misc_seo_description($html_body) { // generate meta tag from the body $p = strip_tags2($html_body); $p = str_replace(array(' ', '>', '<', "\n", ','), ' ', $p); $p = misc_get_keywords($p, 1); return '<meta name="Description" content="' . $p . '">' . '<meta name="keywords" content="' . $p . '">'; }
function rsscache_update_keywords($r) { global $db; // update keywords using the (updated) misc_get_keywords() $t = $r['rsstool_keywords']; if (trim($t) == '') { $t = $r['rsstool_title'] . ' ' . $r['rsstool_desc']; // $t = $r['rsstool_title']; } $t = misc_get_keywords($t, 0); // isalnum $a = explode(' ', $t); for ($j = 0; isset($a[$j]); $j++) { if (trim($a[$j]) != '') { $sql_query_s = 'INSERT IGNORE INTO keyword_table (' . ' rsstool_url_crc32,' . ' rsstool_keyword_crc16' . ' ) VALUES (' . ' ' . $r['rsstool_url_crc32'] . ',' . ' ' . misc_crc16($a[$j]) . ' );' . "\n"; // DEBUG // echo $sql_query_s."\n"; $db->sql_write($sql_query_s, 0); } } }