View Single Post
Old 2005-01-29, 11:55 AM   #8
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
How to do Hosted Free Sites/Hosted Galleries

As per Linksters article, there are a million ways to do this. Without some serverside tricks that can make the experience automatic, you can do it with SSI (Server Side Includes) or PHP.

I am not partial to either, but I feel that the SSI method has a slight performance edge over the PHP method strictly due to the size of the SAPI handler in Apache. This article will cover both methods.

Things you need to have:

You need to know the code that you will be linking to within the pages.
You need to have the reseller ID position within the affiliate URL figured out.
You need to make sure that you know how to have the gallery pages parsed by either PHP or SSI. Most servers might require you to have the extension of the gallery page as .php or .shtml.

So, lets get started.

Lets decide which method to use. My preference is SSI, so lets do it with SSI first. We will name the file gallery.shtml, and the webmaster will send his traffic to:

http://www.domain.com/gallery.shtml?affiliateid

The code on your page will look something like this:

<a href="http://www.site.com/client,site,<!--#echo var="QUERY_STRING"-->.html">Test Link</a>

If you wanted to use PHP, the webmaster will send his traffic to:

http://www.domain.com/gallery.php?affiliateid

The code on your page will look something like this:

<a href="http://www.site.com/client,site,<?php echo $_SERVER['QUERY_STRING']?>.html">Test Link</a>

Remember, the pieces <!--#echo var="QUERY_STRING"--> or <?php echo $_SERVER['QUERY_STRING']?> are replaced in your html whereever you need to have the affiliates ID coded. Since the page is parsed with either SSI or PHP, it will replace the 'bad html' before it is sent to the browser. You might need to use Notepad or some other text editor to do the final work since FrontPage and DreamWeaver may see the html created above as invalid.

In any case, you should be able to start creating hosted freesites and galleries for your affiliates and watch that traffic grow.

An additional note. If you are doing this for freesites, you need to make sure EVERY link contains the code at the end of the link to pass the affiliate's code from one page to the next. Not only do you need to code the links to your affiliate program, you need to code the links to the next pag including your enter link, your gallery 1/gallery 2 links.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote