Jump to content


- - - - -

[Unsupported] CS2-Password Protect Your Codes


  • Please log in to reply
4 replies to this topic

#1 Cool Surfer

Cool Surfer

    Not Guilty!!

  • Members
  • PipPipPipPipPipPip
  • 331 posts
  • Location:India
  • Real Name:Cool Surfer
  • IPB Version:v3.0.x
Contributor

Posted 28 February 2006 - 07:35 PM

File Name: [Unsupported]  CS2-Password Protect Your Codes
File Submitter: Cool Surfer
File Submitted: 28 Feb 2006
File Updated: 22 Mar 2006
File Category: General Tools

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
CODE


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 smile.gif

Click here to download this file
Affordable hosting at www.xpindia.com
Server Alert Reseller XpIndia.Com Forum
Be Kind And Courteous To People On Your Way Up for You Might meet Them On Your Way down...

#2 Rocky

Rocky

    Programmer

  • IM Supporters
  • PipPipPipPipPipPip
  • 442 posts
  • IPB Version:v3.0.x

Posted 06 April 2006 - 09:59 AM

Sorry but I cant get anything out of it...What codes does it protects and how exctally it works sad.gif

#3 SRMN

SRMN

    Member

  • Members
  • PipPipPip
  • 43 posts
  • IPB Version:v2.3.x
Contributor

Posted 19 October 2007 - 03:42 AM

Thank you very much for this.. I really like it.. it helps keep things from getting indexed by Google wink.gif


Posted Image

Posted ImageAdmin of RuneCorePosted Image


msn = Stop_Reading_My_Name@runecore.com


#4 illuszion

illuszion

    Novice

  • Members
  • PipPip
  • 6 posts
  • Real Name:henk
  • IPB Version:v2.3.x

Posted 20 December 2007 - 07:51 PM

why doesnt work for me..? do i something wrong?

#5 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 20 December 2007 - 08:19 PM

View Postscorpion01, on Apr 6 2006, 10:59 AM, said:

Sorry but I cant get anything out of it...What codes does it protects and how exctally it works ;)
Me neither, actually. As "SRMN" says, it keeps the page away from google, but be have robots.txt to do that for us.
And this is more of a tutorial then a Tool.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users