21 May, 2007
How to: Create a Fully Automated Money Earning Homepage - Part 1
Posted by: admin In: Uncategorized
Learn the tips and practical tricks on how to build an automatically updating homepage with PHP and MySQL.
The method of blog-and-ping is the most well-known and effective way to automate self-running homepages that bring in new visitors, and money from advertising.
In this walk-through I will show and tell some of the tricks I’ve learned from practical experience setting up the system that is a fully automated homepage that updates automatically with new content. The homepage contains practical SEO tricks as well to help bring in more visitors from the search engines.
As I am not a very skilled programmer, so in my quest I have relied heavily on the programming tips and tricks of others to help me achieve my goal. I will give credit where possible, but I cannot remember all the links where I got the code from. If someone feels left out, please contact me, so I can provide proper credit where credit is due.
A little background
I purchased the domain go-lol.com a while back, and had really good traffic everyday. The traffic, however, was based on a PPC campaign run by the previous owner, to beef up the numbers. He has since then “disappeared” and I was forced to make some decisions. The domain was not very old, and the script that I purchased with the domain was not exactly state-of-the-art. It lacked several mandatory features, so I set out to see what I could make myself. I decided to experiment.
The site automatically gets new videos/clips, at the moment only from Youtube, but the script can be modified to work with basically any video provider.
Step 1 - Getting the content
I use MagpieRSS to read various rss feeds from Youtube. The data is pulled into a local database, where I manipulate it on the way. Each video has an attached thumbnail, which I download and save locally. I do this to limit the bandwidth from Youtube, to be a good neighbor. Each video is also assigned a SEO-friendly url based on the title of the video. This is done with the following code, that removes illegal characters and spaces in a string:
function makeURLFriendly($string) {
// MAKE STRING ALL LOWERCASE, THIS CAN BE REMOVED
$string = strtolower($string);
// REMOVE ALL THE GUNK EXCEPT FOR THE TEXT
$newstring = preg_replace(’/[^a-zA-Z\d\s]+/s’, ”, $string);
// REMOVE DOUBLE SPACES, PEOPLE PUT IN SOME WEIRD STUFF
$newstring = str_replace(’ ‘, ‘ ‘, $newstring );
$newstring = str_replace(’ ‘, ‘ ‘, $newstring );
// REPLACE THE SPACES WITH HYPHANS, OR UNDERSCORES
$newstring = str_replace(’ ‘, ‘-’, $newstring );
return $newstring;
}
I am not quite sure where I found that piece of code, so please let me know if you know the original writer of that function.
Step 2 - Getting indexed by the search engines
Getting indexed by the search engines is by far the most important step in building your own auto-updating system. To aid in this, I recommend you get your site validated in the Google Webmasters system. Here you can follow the progress of your sites indexation as well as spot potential errors and problems.
Using a sitemap.xml is much easier for you and the search engines. Getting it generated automatically in PHP is very easy with the Google Sitemap Generator class which can be found online here: class/GoogleSiteMap.php.
This small script is run just after the new content is scraped from Youtube. Any new clips are automatically inserted into the sitemap.xml file and Google is pinged with information that the sitemap has been updated.
Remember to read part 2 of the series (it will be out soon) where I will show how I used readily available scripts to generate a RSS feed and ping it to several rss aggregators. I will also show you which program I used to generate the initial backlinks to the homepage, to increase better rankings in the search engines.
Please leave a comment if you have observations or spot a mistake.









