Hi folks.
One of the things that has concerned me with the way E-Smith have their
I-Bays set up is the fact that an I-Bay can be accessed 2 ways.

1). Via the Virtual Domain name you assigned to it and
2). As a sub directory off the main domain name

This can cause some concern if you are hosting several sites for different
folks.. and you don't want their info and yours to intermix.

I've a small PHP snippet that can help here.. This works only with HTML at
the moment.. am looking at ways for FTP locking too

The Function first


<?
Function ipcheck($IP_Addr)
{
// Check who called this page.
// Stops accidental calling from main page

  $Caller = strtoupper(getenv("SERVER_NAME"));

  if ($Caller == strtoupper($IP_Addr))
  {
   // OK.. We have the right address
   Return 1;
  }
    else
  {
   // Invalid Call
   Return 0;
  }
}
?>



To use this do something like

if (ipcheck("Your.Virtual.Domain.Here") != 1)
  {
    echo "Sorry - You Don't have Permissions to view this page";
    exit;
  }




Hope it helps..
Dave



--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org

Reply via email to