08.01.06
Gotta Love Automatic Money
There aren’t too many things out there that are better than free money. Money that you don’t have to think about. Money that every month will be there whether you work for it or not.
Sound like a dream? Well it’s actually not too hard to get some of your own “automatic money”. These days with the popularity of web services and RSS feeds, there is plenty of dynamic content out there for you to input into your own blog and provide your users with some sort of up-to-the-minute live data streams for them to browse.
Still not sure what I’m talking about? Take a look at my Current Top 15 Internet Searches page. Every month I get hundreds of visitors who searched for the term “WWE” and reached this page, which by the way has a Page Rank of 4. Does CyberWyre have anything to do with World Wrestling Entertainment Inc? Nope, but I do get a lot of traffic from it, and banner clicks too.
Search for some RSS feeds or Web Services revolving around the niche your blog or website fills. There must be some sort of Top-10 list or news feed which you can parse in your code, and display to your users nicely nested inside of your website layout. The beauty of this is once you create the page, you’ll never have to update it again.
Adding Dynamic Content to WordPress
WordPress is written in PHP and to insert your own dynamic content into your pages, you should be at least a little familiar with the PHP programming language. To add dynamic content to your WordPress blog, first you will need to install the PHPExec plugin in your site. After this, you may insert your own PHP code into your blog entries between the tags < phpcode> and < /phpcode>
Here is the code which I myself use to dynamically insert content into my pages from an RSS feed:
< phpcode>
< ?php
$url = "YOUR RSS URL HERE";
$xml = simplexml_load_file($url);
$i = 0;
foreach ($xml->channel->item as $title) {
$dispTitle = $title->title;
$dispTitle = str_replace("'", "", $dispTitle);
$j = $i + 1;
echo "$j. $dispTitle";
$i++;
} //end for each
?>
< /phpcode>
Note: in the above example, I had to insert spaces in the php & phpcode tags so that my own plugin does not parse them. Remove the spaces when using for your own site.
The code above will loop through the entries in an RSS feed and display them on your blog. You can edit the code to format the data as you like. You now have a self-updating site that you will never have to maintain again, and always be giving your viewers some fresh content to read.
Try it out for yourself, and get some of that automatic money!
I want to understand how will I earn money through this technic so kindly describe me in detail
If you’re still don’t know how to do it, after all explanations, then perhaps you don’t deserve for those money.
Thanks for the useful advice, Matt!
BTW, where did you found the top searches statistics? I’ve looked through Google ZeitGeist (http://www.google.com/press/zeitgeist_monthly.html) but it has different results then yours.
Useful tip. However, whenever I try to load a page with this code in it, I get this error:
Parse error: syntax error, unexpected T_VARIABLE, expecting ‘,’ or ‘;’ in /home/linksnpa/public_html/techscraper/wp-content/plugins/phpexec.php(78) : eval()’d code on line 10
Clues?
I would suggest using the code in a PHP file without WordPress and get it working there first. Then once all your code is ready, simply paste it into your blog, and insert the appropriate tags around the code and it should start to execute.
Thescrapper,
If you’ve got problems with some piece of code, play with it until you figure it out. People here are not your mommy.
Well interesting code, if i could get it to work.
Is this possible with an rss to javascript converter?
Its seems like it it works very well for me.. “rss2html” is cool.
.Thats not a plug or spam btw.
Pretty cool. I will have to try this out. I use a lot of php programming and this would be a nice way to add new content every day.
Thanks!
Great blog with excellent posts.
I have referred you in my blog.
I checked the link that you have given as examples in your post.. and both links display php errors… You may want to correct those.
Fatal error: Call to undefined function: simplexml_load_file() in /home/pullerit/public_html/cwire/newsSearch/index.php on line 43
Fatal error: Call to undefined function: simplexml_load_file() in /home/pullerit/public_html/cwire/wp-content/plugins/phpexec.php(61) : eval()’d code on line 4
Thanks,
Tony