code
Neat wordpress trick
Extract all the emails from the comments in a wordpress blog.
I haven’t tried this yet but saw it on a webmaster forum.
<?
$db_host = “localhost”;
$db_user = “username”;
$db_password = “password”;
$db_name = “database”;
$connect=mysql_connect($db_host,$db_user,$db_password) or die(mysql_error());
$db=mysql_select_db($db_name, $connect) or die(mysql_error());
$result=mysql_query(“select comment_author_email from wp_comments”);
while($row=@mysql_fetch_assoc($result))
{
$email=$row[comment_author_email];
echo $email;
}
?>
If you enjoyed this post, make sure you subscribe to my RSS feed!
10 Most famous webmaster forums
1. DigitalPoint.com - You can learn to make money running a website. Many great tips.
2. SitePoint.com – A webmaster haven. Many great internet gurus post here.
3. WebMasterWorld.com – It talks a lot about Adsense. Big name players come here including Google employees.
4. SearchEngineWatch.com – There is a really good section on Google. Discusses many types of SEO [...]
