header pictures for dedicated hosting services

FreeBSD Hosting and Dedicated Hosting Services

FreeBSD forums cover everything from setting up FreeBSD on your computer or webserver to common questions related to system hardware and software tweaks.

This article is on:

PHP web pages for FreeBSD Dedicated Servers


Hosting websites on your FreeBSD dedicated server is easy and when combined with an apache web server and an install of PHP. With the power of PHP you can create dynamic web pages that can react based on web surfer behavior. So lets say you have an ad campaign and have paid for a banner ad from xyz site, you know the demographics of the web surfer that visits the site are hardcore Internet gamers but your website sells general products, with Internet games being one of them. (this script will work regardless of if you are using a dedicated hosting services or have a virtual server).

You can write a simple PHP script that checks the link and based on what is in the link displays the appropriate web content.

In this example the link will be to your site say yourdomain.com?totalgamers

You can then write a PHP script and name it index.php which will check your URL on your websited hosted on your FreeBSD server for any additional extensions in this case "?totalgamers" the loads the appropriate content.

 

<?php

 

if ( $url == 'http://yourdomain.com/index.php?totalgamers' ) {
include "specialinludeforgamers.php";
} else {
include "regularcontent.php";
}

echo $url;
?>

 

Looking for our FreeBSD Forums? We have moved them off our main page,just follow the link to our FreeBSD Forums page.

Guests Visit the FreeBSD Forums  •  Login to the FreeBSD Forums  •  Register for FREE
Custom Search


Copyright © 2009, WEBSERVER CONSUMER GUIDE

Privacy Policy

Please note:
(1) FreeBSD is a registered trademark of The FreeBSD Foundation.
(2) WEBSERVER CONSUMER GUIDE is in no way affiliated with The FreeBSD Foundation