Technique: Multiple Rotation Shoutboxing Sigging Image Links
Difficulty: Moderate (hah, not advanced)
Prereq: Multiple Sig Shoutboxes installed into directories:
ROOT
|--directory
| |---map.php
| |---shoutbox.php
| |---shoutboxshout.php
| |---shoutbox_background.jpg
|--directory
and so on. a map.php must exist in every subdirectory
randosig.php
<?PHP
// Shoutbox Randomizer
// Because Jakob <3 AAN
// Written 7-29 @ late 'o thirty
define("BASE_PATH","./")
define("SHOUTBOX","shoutbox")
define("PHP_EXT", ".php")
// here are our image maps
$shoutboxes[] = "barton";
$shoutboxes[] = "gambino";
$shoutboxes[] = "park";
$shoutboxes[] = "durem";
// select a random integer between 0
// and the size of the shoutbox
$file = rand()%sizeof($shoutboxes)
// WHERE?! Set a Cookie and a Session Variable
// So that we will remember what we were looking
// at in map.php
setcookie("SigMap", $shoutboxes[$file],time()+60*60*24*30,"/",".silver-entity.com",0)
session_start()
$_SESSION['SigMap'] = $shoutboxes[$file]
// run that shoutbox!
require(BASE_PATH.$shoutboxes[$file]."/".SHOUTBOX.PHP_EXT)
?>
map.php
<?PHP
// map.php
// Another Pointless Jakob Creation
// This looks at that session / cookie
// from last time, and calls our happy image map file!
// Written 7-30 @ 12:18 AM
define("BASE_PATH","./")
define("IMAP","map")
define("PHP_EXT", ".php")
// What image did we look at?
if(isset($_COOKIE["SigMap"])) {
$what = $_COOKIE["SigMap"]
} else {
// stupid browser...
session_start()
$what = $_SESSION["SigMap"]
}
// right, run that code!
require(BASE_PATH.$what."/".IMAP.PHP_EXT)
?>
In Sig
<center>[url=http://www.silver-entity.com/map.php]<img src="http://www.silver-entity.com/randosig.php" ismap border="0" />[/url]</center>
Final Product:
<center>
<img src="http://www.silver-entity.com/randosig.php" ismap border="0" /></center>