Tuesday, April 5, 2011

How to Export WordPress Commentators Email


Many visitors have asked me a question: How to Export WordPress Commentators information such as email address, site urls, names, etc. Today, here we got the answer.

First, you need to create a new file which called: export-url.php

Then, copy the following codes to the file:

header(‘Content-Type:text/html;charset=utf-8′);
$conn = @mysql_connect(‘localhost’, ‘Your Database User Name Here‘, ‘Database User Password‘) or die(“Datebase Could not be connected: ” . mysql_error());
mysql_select_db(‘Your wordpress blog database name‘);
// exclude no url data
mysql_query(“set names ‘utf8′”);
$result = mysql_query(“SELECT DISTINCT comment_author_url,comment_author_email,comment_author FROM wp_comments WHERE
comment_author_url != ” AND comment_type = ” AND comment_author_url != ‘http://’”, $conn);
while($row = mysql_fetch_array($result)) {
echo $row["comment_author"].” “;
echo “ echo $row["comment_author_url"];
echo “‘>”;
echo $row["comment_author_url"].” “;
echo “
”;
echo $row["comment_author_email"].”
”;
}
mysql_free_result($result);
?>

Change the data marked in blue to your personal info, then save the file.

Third, upload the file to your site root folder and visit http://yoursite.com/export-url.php

You’ll see the full list of your WordPress Commentators’ names, URLs and Emails.

Enter your email address:

Delivered by FeedBurner

0 comments:

Friends

Popular Posts

Advertisement

 

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com