Today I developed this tool to import wordpress blog rolls as XML document. You know when you export data from wordpress.com that doesn’t include the blog rolls data. So if you want to keep a backup of your blog rolls, you can use this tool to import your blog rolls data.. This one is developed using PHP and Curl
You can doewnload it and see the code in action here
Opensource WordPress Blogrolls Importer
################
The trick is lying here —
;
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, “./login.jar”);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
//curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // this line makes it work under https
curl_setopt($ch, CURLOPT_URL,“{$url}/wp-login.php”);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, “log={$username}&pwd={$password}&&redirect_to=wp-admin/link-manager.php&wp_submit=”);
$buffer= curl_exec ($ch); // execute the curl command