2012年7月3日星期二

Syndicate your content using PHP and MySQL

Syndicate your content using PHP and MySQL

IntroductionSo, you've spent the best part of a year creating your PHP/MySQL driven web site. You've got a fair amount of decent, flexible content, and you're buddies with a couple of other webmasters, so they've given you a free banner ad on their site in exchange for one on yours. Promoting your site can be even harder than developing it. I've found that one of the best ways to attract more visitors to your site is by sharing your content with whoever wants it. That's right; let them publish your articles on their site (as long as they add a link back to your site near the end), write articles specifically for other web sites and eZines and setup a content feed from your site. Just last week I setup a content feed similar to the one I'm going to describe in this article. I want to share with you exactly how I went about doing so. What's that I hear you say? "How do I setup a content feed? I only know PHP and MySQL!". Never fear I say, for in this article I will show you how easy it is to set one up. But first, let's discuss why you would want to setup a content feed for your site. Why a content feed?If your site's going to succeed on the net, it needs to contain useful, free content targeted directly at a niche market. Take a look at some of the most popular new sites on the 'net: ZDNet, Slashdot, Cnet, MoreOver, etc. All of these sites provide dynamic content feeds that anyone can use on their site, meaning that if I wanted to display their recent news headlines on my site, I would just have to fill in a form and paste some HTML tags on my site and I'd be done. If Joe Bloggs posts the HTML code for ZDNet's content feed on his site, then it's a win-win situation: Joe is providing valuable news to his visitors that keeps them coming back on a daily basis, and ZDNet get the traffic from Joes visitors actually clicking on the news headlines to see the full story on their site. Here's a list of reasons why you should consider creating your own content feed like ZDNet's:It's one of the best forms of free advertising that you can get.
Once other people post your content feed on their site, each headline actually links back to the full article your site. As many of you will know, the more links you have back to your site from other sites, the higher search engines such as Google will position you in their rankings.
Obviously, having others post your content feed on their site will boost your traffic. By how much though depends on the quality of your content and how you name your headlines.
I've recently syndicated this sites articles into an XML-based content feed and it truly is working wonders for our visitor count. If you're familiar with XML, then you can see the XML file here. Hopefully by now I've convinced you to setup a content feed for your site. Let's take a look at creating a sample content feed using some PHP and a MySQL database.

没有评论:

发表评论