Multi-Server SiteWorx login

So let’s say I’ve got a script setup on my site that allows members one easy location logoin to siteworx. Let’s go on to say that it looks like, oh, say, this:


<table id="login" cellpadding="0" cellspacing="0" border="0">
    <form action="https://216.86.157.21:2443/siteworx/index.php" method="POST" name="login">
    <input type="hidden" name="action" value="login">
    <tr>
 <td width="100%" colspan="2">
      <p align="center"><b>
      <img border="0" src="images/joystick.gif" width="32" height="32" alt="joystick">   Control Panel Login</b></td>
    </tr>
    <tr>
      <td class="labels" width="37%" align="right"><font color="#808080"><b>
      E-mail:  </b></font></td>
      <td width="63%">
      <input class="textbox" type="text" name="email" id="email" tabindex="1" value="" size="20" /></td>
    </tr>
    <tr>
      <td class="labels" width="37%" align="right"><font color="#808080"><b>Password:  </b></font></td>
      <td width="63%">
      <input class="textbox"
               type="password" name="password" id="password" tabindex="2" size="20" /></td>
    </tr>
    <tr>
      <td class="labels" width="37%" align="right"><b><font color="#006400">(sub)</font><font color="#808080">Domain:  </b></font></td>

      <td width="63%">
      <input class="textbox"
            type="text" name="domain" id="domain" value=""
                tabindex="3" size="20" /></td>
    </tr>
    <tr>
      <td width="37%"> </td>
      <td width="63%" valign="top" align="right">
        <p>
        <font size="1"><a href="http://freewebsitehost.net/fwhforum/viewforum.php?f=12">
        Forgot?</a>          <input type="image" src="images/login.jpg" value="Login" width="69" height="17"></font></td>
    </tr>
 </form>
  </table>

Hypothetically, this will work just fine, until I add a second server that’s not clustered to the first. After that, this form data will need to be passed to a different server, dependent on what the user enters for ‘domain’. Any thoughts on how to make that work?

You could do a manual post using PHP.

Have the form post to itself and put in some code to check the domain then do a post to the correct server using sockets or something.

I think that would work.

Could you be so kind as to post an example? I’m somewhat PHP-illiterate. :rolleyes:

Actually when I think about it, sending a POST with PHP would keep you on the same page instead of sending the browser to that new page so that probably not a good way to do it.

I would go with the simple approach as many big webhost do. Name your servers for your clients and tell them which server they are.

Then when they go to the log into siteworx page on your main site they first click on their server and then that form will be the correct one for them.