How I'd handle listing my calls in a script:
Code:
<?php
if($_SERVER["HTTPS"] == "on") {
  $type = "https";
}else{
  $type = "http";
}
$host = $_SERVER["HTTP_HOST"];
$url = "$type://$host/";
$me = $_SERVER["SCRIPT_URL"];
?>

<a href="<?php echo($ssl); ?>://<?php echo($host); ?><?php echo($me); ?>?function=call">link to script</a>
That way it'll auto update the script name and if it's being accessed through https or not; however as it's a mail script you don't really NEED ssl support so that'd knock us down to:
Code:
<?php
$host = $_SERVER["HTTP_HOST"];
$me = $_SERVER["SCRIPT_URL"];
?>

<a href="http://<?php echo($host); ?><?php echo($me); ?>?function=call">link to script</a>
Or even:
Code:
<?php
$script = $_SERVER["SCRIPT_URI"]
?>

<a href="<?php echo($script); ?>?function=call">link to script</a>
However I woudln't reccommend using the final one for subdomains; for some reason "script_uri" doesn't like subdomains in some enviroments (oen of the manyt hings i had to fix in the fserv)
_________________________
Donate to UGN Security here.
UGN Security, Back of the Web, Elite Web Gamers & VNC Web Design Owner