Importing...
You need to supply your OPML url. Press back on your browser and try again\n";
}
else
{
$opml = implode('', file($opml_url));
// Updated for new format thanks to Rantor http://wordpress.org/support/2/769
preg_match_all('/
/',$opml,$items);
$names = $items[1];
$types = $items[2];
$urls = $items[3];
$titles = $items[5];
$targets = $items[6];
$link_count = count($names);
for ($i = 0; $i < $link_count; $i++) {
if ('Last' == substr($titles[$i], 0, 4))
$titles[$i] = '';
if ('http' == substr($titles[$i], 0, 4))
$titles[$i] = '';
//echo "INSERT INTO $tablelinks (link_url, link_name, link_target, link_category, link_description, link_owner) VALUES('{$urls[$i]}', '{$names[$i]}', '{$targets[$i]}', $cat_id, '{$titles[$i]}', \$user_ID)
\n";
$query = "INSERT INTO $tablelinks (link_url, link_name, link_target, link_category, link_description, link_owner)
VALUES('{$urls[$i]}', '".addslashes($names[$i])."', '{$targets[$i]}', $cat_id, '".addslashes($titles[$i])."', $user_ID)\n";
$result = $wpdb->query($query);
echo "
Inserted {$names[$i]}
";
}
?>
Inserted links into category . All done! Go manage those links.