Tag Archives: root directory

Recommended Root-directory

PHP DIY – How to Add RSS Feeds to Any Website/Blog using Magpie RSS Parser!

One of the most common things we do in today’s Web2.0 programming are RSS feeds.  Now there’s a bunch of ways you can add RSS feeds to your website but let me tell you the BEST way using PHP.

1) Download and unzip Magpie RSS in your website root directory somewhere.

2) Anywhere in your PHP code, add the following line, while making sure the full directory path is specified.  (I usually like to put it in directory such as “magpie”)

require('rss_fetch.inc'); $myurl="http://ze

Click Here to Read Full Article

6 Comments

PHP DIY – How to Add Caching to ANY website!

In my recent ventures, I have resorted to finding great PHP code to cache my website.

Even if you are not using WordPress, you can still make a simple PHP caching mechanism without the use of WordPress Super Cache.  (Well, all WordPress Super Cache is a PHP cache with user-friendly menus.)

Here’s how to add caching to your website:

Copy and paste the following code and save as “cache.php” in your website root directory:

<?php // Settings $cachedir = ‘cache/’; // Directory to cache files in (keep outside web root) $cachetime = 600

Click Here to Read Full Article

3 Comments