Jump to content

  •  

  • Submitter

    SUPPORT TOPIC File Information

    • Submitted: Feb 28 2006 06:56 PM
    • Last Updated: Mar 22 2006 05:04 AM
    • File Size: 506bytes
    • Views: 2516
    • Downloads: 50

    Download [Unsupported] CS2-Password Protect Your Codes

    * * * - - 1 Votes



    Screenshots
    This is a simple script that you can add to your codes and mod files, so that an unauthorised user
    cant misuse the file.

    Just add the code like this eg:

    if admin.php is

    <?php

    echo "hello php1"
    ?>

    add the password code like this
    
    session_start(); 
    if ( $_POST['password'] == "your-password" ){ 
       $_SESSION['isadmin'] = "yes"; 
       header("location: http://".$_SERVER['HOST'].$_SERVER['REQUEST_URI']); 
    } 
    if ( $_SESSION['isadmin'] != "yes" ){ 
       echo '<body text="#00FF00" bgcolor="#000000"><center>
    
    Enter Your password:
    
    <form action="" name="login" method="post">Password:<input type="password" name="password"><input type="submit" value="login"></form>
    
    <a href=mailto:coolsurfer@gmail.com><font color="#00FF00">Cool Surfer Email</font></a>
    <a href=http://xpindia.com>
    <font color="#00FF00">XpIndia.Com</font></a></center>'; 
       die(); 
    } 
    
    echo "hello php1" 
    ?>

    Regards

    CS
    coolsurfer@gmail.com
    www.xpindia.com

    PS: Just refresh your browser ( hit f 5) after entering the pwd, else you will see a blank page.
    Nothing to worry :D




    Other files you may be interested in ..





    • 1,381 Total Files
    • 44 Total Categories
    • 164 Total Authors
    • 480,463 Total Downloads
    • Deviant Latest File
    • Bitter Latest Submitter

    4 user(s) are online (in the past 30 minutes)

    1 members, 2 guests, 0 anonymous users


    blAQbARt, Google