You *could* use a cookie, or the PHP session API's.. just do this in both scripts.
<?php
session_start();
if (!isset($_SESSION["number"]))
{
$_SESSION["number"] = rand()*10; // or whatever
}
else
{
// produce the correct image for the number here.
}
?>
It might be easier to put both scripts into one, and then use $_SERVER["PATH_INFO"] or something similar to that.
(You can't use query_string since the forums will block out the ? character and think it points to an automated script).
Path info works like this:
http://www.yourdomain.com/scriptname.php/path_info_is_here (http://www.yourdomain.com/scriptname.php/path_info_is_here)
For example:
if ($_SERVER["PATH_INFO"] == "avatar.png")
{
// avatar generation
}
else if ($_SERVER["PATH_INFO"] == "sig.png")
{
// sig generation
}
(The PNG's are there to make the forums think you linked to a static png file).
Then, the last thing to remember is that you need to destroy the session
(if you want them to randomize again on a new page request).
There might be a more ingenious way of doing it.. a cookie is the best way I can think of at the moment.