Really depends on what you are trying to do with your hosted stuff. If you are doing Hosted Free Sites with two Hosted Galleries behind it, you should treat it just as you would a gallery that you are submitting, and then figure out how much traffic you get from that, multiplied by the number of webmasters.
Since you have to pass affiliate codes, its my personal preference to use SSI over PHP to pass the query string from page to page, but, either one is fine. A relatively good server, P4 2.4ghz or better would have no problem handling 20mb/sec or so of traffic considering every page using PHP. Probably a bit more using SSI.
Since you have a very static setup, i.e. galleries are uploaded, there isn't much that will change, it would be relatively easy to rsync to another server and just use round-robin dns to 'load balance'.
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/page.html?<!--#echo var="QUERY_STRING"-->">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/page.html?<?php echo $_SERVER['QUERY_STRING']?>">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.