1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Windows: IIS: Auto-Login Via Script

Discussion in 'Legacy Sitebuilder Software' started by abner66, May 18, 2005.

  1. abner66

    abner66 Guest

    0
     
    Using Auto-Login Scripts from Foreign Membership databases can be accomplished using IIS and your Favorite Scripting Language.

    The KEY to auto-logging into Sitebuilder is that the information must use the POST method.

    So to accomplish this, I simply create a Form with all of the required hidden fields, and a button. Next, As soon as the form is loaded, using JavaScript I trigger an auto-fire to "Click" the button - which causes the page to be submitted to the login.php file. The nice thing about this method is that the form can be stored on any server - and not just the Sitebuilder one.

    Here are the hidden fields that need to be POSTed:
    cmd=login
    sb_username
    sb_password
    sb_ftp_host
    sb_ftp_host_name
    sb_site_identity

    Hope this helps...

    ...Paul
     
  2. Checo

    Checo Guest

    0
     
    Hello Paul,

    Thanks so much for your information. This is really what I'm looking for because the original login is just too difficult for newbies and even with detailed instructions on the web, customers just keep sending support tickets.

    I have one question that I hope you would be so kind to help me with :)

    1) Could you by any chance post an HTML code of an autologin form, including the javascript code? I'm trying to implement this to my PHP script on a linux box.

    I would greatly appreciate your help :)

    Regards,

    Checo
     
  3. abner66

    abner66 Guest

    0
     
    Here is some sample code...

    Here is a code sample to do the Auto-Login. You will Need to replace the Items in brackets with your PHP Code to dynamically load the Variables.

    ...Paul


    <html>
    <header>

    </header>
    <body onLoad="javascript:document.myfrm.submit();">
    <form name="myfrm" action="http://<YourSiteBuilderAddress>/login.php" method="post">
    <input type="hidden" name="sb_username" value="<CustUserName>">
    <input type="hidden" name="sb_ftp_host" value="<YourFTPHostName>">
    <input type="hidden" name="sb_password" value="<CustPassword">
    <input type="hidden" name="sb_site_identity" value="<CustWebsiteIdentity">
    <input type="hidden" name="cmd" value="login">
    <input type="hidden" name="sb_ftp_host_name" value="<YourFTPHostName">
    <input type="submit" name="SB" name="Submit">
    </form>
    </body>
     
Loading...