i need help with php scripting..

Discussion in 'Web Programming' started by numnutranger, Mar 21, 2007.

i need help with php scripting..
  1. Unread #1 - Mar 21, 2007 at 8:01 PM
  2. numnutranger
    Joined:
    Jul 21, 2006
    Posts:
    97
    Referrals:
    0
    Sythe Gold:
    0

    numnutranger Member

    i need help with php scripting..

    what im doing is pretty simple but i have about.. well.. no experence with php =\
    okie, im making a HTTP proxy site with the free script PHProxy. i want to add a feature where it requires a preset username and password.
    example: i want just 1 username and password to be able to get into the site
    so a few of my freinds can get into the site threw school and it won't lag down my server
    the download site is
    http://whitefyre.com/poxy/
    actuly if you can intergrade it into the script using the username "ipwnrake" and the password "cheese"
    that would be great to, remember, im terrable when it comes to php =\
    thanks in advance
    -chuck white.

    EDIT: i've jacked a sorce from another site, its almost want i want but it dosn't have a preset username and such.



    PHP:
    <input  ype="text"  name="username" />
      </
    p>
      <
    pPassword</p>

      <
    p><input type=text  name=password />&nbsp; </p>
      <
    input type=submit value="Login" />
      </
    form>
      
    </
    div></center></td>
       <
    td><img src="images/spacer.gif" width="1" height="280" border="0" alt="" /></td>
      </
    tr>
      <
    tr>
       <
    td>   <br /><br /><div id="Login" style="border:solid; border-width:thin;">

       <
    div style="margin-left:10px; margin-right:10px; margin-top:10px; margin-bottom:10px;">
      <
    p align="left" ><strong>Create Account </strong></p><p  style="margin-bottom:8px;" >
      <
    form action="secure.php" method="post">
    <
    input type=hidden name=act value=login>
    <
    p>School ID </p>
    <
    p  style="margin-bottom:5px;" >
      <
    p>
     
  3. Unread #2 - Mar 22, 2007 at 7:07 PM
  4. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    i need help with php scripting..

    Code:
    <?php
    if(isset($_GET['check'])) {
    $un = $_POST['un'];
    $pw = $_POST['pw'];
    if($un == "ipwnrake" && $pw == "cheese") {
    //put your proxy or whatever here (remove the //)
    }
    else {
    echo "wrong pw/un combo.";
    echo "";
    }
    else {
    ?>
    <form action="?check" method="post">
    <input type="text" name="un" value="username">
    <input type="password" name="pw" value="password">
    <input type="submit" name="submit" value="login">
    </form>
    <?php
    }
    ?>
    
    Just made that up on the spot; have no place to test it. There shouldn't be any errors though.
     
< Need JavaScript help. | What Does Mm Mean?????????????????????????????????????????????? ?????????????????????? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site