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.
Strategies How To Monetize Your Blog
-
This article talking about how to Increase your readers interest, keep
people coming back to your blog regularly? And help you with blog link
building, lin...
13 years ago
0 comments:
Post a Comment