Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 51

Thread: Kick-out script...

  1. #21
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    You don't have PHP setup locally. Put that on your server and see if it works.
    Corrections to my coding/thoughts welcome.

  2. #22
    Join Date
    Sep 2010
    Location
    Hi Stalker.
    Posts
    148
    Thanks
    16
    Thanked 3 Times in 3 Posts

    Default

    Success! http://kapleenmusic.webfreehosting.n...estyouknow.php
    Now, HTAccess time again. I can still access it w/o logging in any solutions?

  3. #23
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Do you have control to edit the page you are forwarding the user to?
    Corrections to my coding/thoughts welcome.

  4. #24
    Join Date
    Sep 2010
    Location
    Hi Stalker.
    Posts
    148
    Thanks
    16
    Thanked 3 Times in 3 Posts

    Default

    The CPanel? Yeah.

  5. #25
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Okay, you'll need to convert it to a php file. I'll post another code for you in a bit that should do it.
    Corrections to my coding/thoughts welcome.

  6. #26
    Join Date
    Sep 2010
    Location
    Hi Stalker.
    Posts
    148
    Thanks
    16
    Thanked 3 Times in 3 Posts

    Default

    I had to make it manually so I have full access to it :P
    Thanks!!

    -[Nic]-

  7. #27
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Cpanel code:

    PHP Code:
    <?php
        
    //If not sure use the form to get here and copy what is displayed above the fail in quotes (if the welcome is displayed you id it correctly.
        
    echo "Copy the value in these Quotes '" $_SERVER['HTTP_REFERER'] . "'<br />";
    if (
    $_SERVER['HTTP_REFERER'] == "http://domain.com/directories/name.php" || $_SERVER['HTTP_REFERER'] == "http://www.domain.com/directories/name.php") {
        echo 
    "Welcome<br />";
        if (
    $_GET['secured'] == 24) {
            echo 
    "Verified";
        } else {
            echo 
    "Unverified";
        }
    } else {
        echo 
    "Fail";
    }
    ?>
    Form Page:


    PHP Code:
    <?php
    if (isset($_POST['username']) && isset($_POST['password'])) {
    if (
    $_POST['username']=="a" && $_POST['password']=="a") {
        
    header("Location: http://domain/directories/name.php?secured=24");
    }
    }
    ?>
    <form name="login" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
         <div align="center">
              <center>
                   <table width="225" cellpadding="3" border="1">
                        <tbody>
                             <tr>
                                  <td colspan="2"><font size="5"><b>Members-Only Area!</b></font></td>
                             </tr>
                             <tr>
                                  <td>Username:</td>
                                  <td><input type="text" name="username" size="20"></td>
                             </tr>
                             <tr>
                                  <td>Password:</td>
                                  <td><input type="text" name="password" size="20"></td>
                             </tr>
                             <tr>
                                  <td align="center" colspan="2"><input  type="submit" value="Login!"></td>
                             </tr>
                        </tbody>
                   </table>
              </center>
         </div>
    </form>
    Corrections to my coding/thoughts welcome.

  8. #28
    Join Date
    Sep 2010
    Location
    Hi Stalker.
    Posts
    148
    Thanks
    16
    Thanked 3 Times in 3 Posts

    Default

    Do I add the PHP code with the HTML code on the CPanel?
    And the links in both codes, what do I change those to?
    Like,
    Code:
    Instead of "header("Location: http://domain/directories/name.php?secured=24");"  to  "header("Location: http://kapleenmusic.webfreehosting.net/login.php?secured=24"); ?
    And,
    Code:
    Like, "if ($_SERVER['HTTP_REFERER'] == "http://domain/directories/name.php" || $_SERVER['HTTP_REFERER'] == "http://www.domain.com/directories/name.php") {
    to
    if ($_SERVER['HTTP_REFERER'] == "http://kapleenmusic.webfreehosting.net/CPANEL=304935609023q840943903258fg094et9ig0r9e.php" || $_SERVER['HTTP_REFERER'] == "http://kapleenmusic.webfreehosting.net/CPANEL=304935609023q840943903258fg094et9ig0r9e.php") { ?

  9. #29
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    First quote yes, second quote no, copy the address that appears when you are forwarded there. It's not the page that you are on but the page that gets you there. The second address should have the www. because users/ you can access your site via http://site or http://www.site

    The html goes inside where it says echo "Verified";

    Delete "echo "Verified"; and put in

    Code:
    ?>
    HTML OF CPANEL GOES HERE....
    <?php
    Corrections to my coding/thoughts welcome.

  10. #30
    Join Date
    Sep 2010
    Location
    Hi Stalker.
    Posts
    148
    Thanks
    16
    Thanked 3 Times in 3 Posts

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •