PHP Mini Sites Cms: template system and rewrite rules

In this fourth post we’ll have to actually do something useful with our code. Simply add the following at the end of the previous script.

if($found)
{// set up variables with content
$title=$items[0];
$url=$items[1];
$post=$items[2];
$tags=$items[3];
$description=$items[4];
$author=$items[5];
$date=$items[6];
}

else

{ // if we get here there was a 404 error either for malformed url or because we couldn’t…………….

Read PHP Mini Sites Cms: template system and rewrite rules »

Simple Flat File CMS in PHP – Part 3

In this third post, we’ll have to actually do something useful with our code. Simply add the following at the end of the previous script.

if($found)
{// set up variables with content
$title=$items[0];
$url=$items[1];
$post=$items[2];
$tags=$items[3];
$description=$items[4];
$author=$items[5];
$date=$items[6];
}

else

{ // if we get here there was a 404 error either for malformed url or because we couldn’t…………….

Read Simple Flat File CMS in PHP – Part 3 »

Flatfile PHP CMS tutorial – Part 2: the code

Time to define the structure for our flatfile CMS or Blog, and see the PHP code needed to parse it.

Read Flatfile PHP CMS tutorial – Part 2: the code »

PHP Tutorial : Random link rotator

Hi,
In this php tutorial you will learn how to build a random link rotator. Basically, we’ll build a php array with the links needed to rotate and then we’ll print to user the link randomly.

<?php
$links = array(“link 1″, “link 2″, “link 3″);
$max = sizeof($links);
$rand = rand(0, $max);
print $links[$rand];
?>

Read PHP Tutorial : Random link rotator »

PHP Tutorial : Function – Filter unwanted words

I needed to build a simple function which could be used to filter words that you wouldn’t want to appear on your website, forum, guestbook, comments section or you-name-it section.
In short, the kind of thing you would place within an html form, when validating an input or textarea element.
Everything can be done in a…………….

Read PHP Tutorial : Function – Filter unwanted words »