Submit Your Article Forum Rules FAQ About Us
Search the forums:

Tech Support Team


Hello and Welcome to Tech Support Team! Before you can start posting and answering questions, you'll have to register. Registration is fast, simple and absolutely free! Feel free to browse through existing questions by choosing the forum you want to visit below.



Reply
  #1 (permalink)   Top
Old 12th November 2008, 08:28 PM
iTouch's Avatar
Newcomer
 
Join Date: Nov 2008, 23 posts.
Location: Hull, UK
Reputation: iTouch is on a distinguished road
Password protect a page

Hi,

I have a file uploader that only i want to use e.g. http://www.mysite.com/files/upload.php but i want there to be a password protection so a password protection so no one else can use it.

Something either like a php script to insert into my uploader script before i can upload something or a webpage that if the password is correct takes that page to the uploader.

but if i host an image or something on another site e.g http://www.mysite.com/files/image.jpg i still want them to be able to view it on a site or forum and be able to view in its own but not be able to go to http://www.mysite.com/files/upload.php without entering a password
Reply With Quote
  #2 (permalink)   Top
Old 12th November 2008, 08:34 PM
Blackmirror's Avatar
TST Oracle
 
Join Date: Jul 2008, 8,171 posts.
Location: UK Norfolk .....
Reputation: Blackmirror is on a distinguished road
You need Dudeking
oh Eddie
where are you ???
__________________
Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, chocolate in one hand, wine in the other, body thoroughly used up, totally worn out and screaming...
Damn, What a ride!!
Reply With Quote
  #3 (permalink)   Top
Old 12th November 2008, 09:35 PM
Klunk's Avatar
TST Enthusiast
 
Join Date: Jul 2008, 279 posts.
Reputation: Klunk is on a distinguished road
Why not use .htaccess and .htpasswd on the folder that holds the page you want to protect from others seeing
Reply With Quote
  #4 (permalink)   Top
Old 12th November 2008, 09:47 PM
dudeking's Avatar
TST Expert
 
Join Date: Jul 2008, 583 posts.
Location: Nottingham, UK
Reputation: dudeking is on a distinguished road
Forget htaccess lol it will block your images as well if you don't do it properly.

Go for somthing like this...errrr..

PHP Code:
<?php
if(isset($_POST['submit'])){
     
$password 'yourpassword';
     if(
$password == $_POST['typedpassword']){
    
//add upload script here
     
}else{
    echo 
'wrong password';
    }
}else{
   echo
'<form action="thispage.php" method="post">
<input type="password" name="typedpassword" />
<input type="submit" name="submit" value="Login" />
</form>'
;
}
?>

Not tested it but thats the basic idea
Reply With Quote
  #5 (permalink)   Top
Old 17th November 2008, 10:29 PM
CJ1985's Avatar
TST Enthusiast
 
Join Date: Sep 2008, 295 posts.
Location: Michigan
Reputation: CJ1985 is on a distinguished road
You can more than likely find this by googling, which can give you many different types of password protecting codes.

Good luck iTouch
__________________
"People think at the end of the day that a man is the only answer [to fulfillment]. Actually a job is better for me."
Princess Diana
Reply With Quote
  #6 (permalink)   Top
Old 18th November 2008, 10:43 AM
dudeking's Avatar
TST Expert
 
Join Date: Jul 2008, 583 posts.
Location: Nottingham, UK
Reputation: dudeking is on a distinguished road
Have you managed this mate? Just modifi the script and add that in, its better than .htaccess beacuse you have everything in one place. Also with most scripts you find on google will be javascript...which can be hacked in less than a second.
Reply With Quote
  #7 (permalink)   Top
Old 18th November 2008, 12:40 PM
CJ1985's Avatar
TST Enthusiast
 
Join Date: Sep 2008, 295 posts.
Location: Michigan
Reputation: CJ1985 is on a distinguished road
Ah, didn't know that dudeking, thanks for letting me know!! Go with what dudeking says, he knows what he's talking about.
__________________
"People think at the end of the day that a man is the only answer [to fulfillment]. Actually a job is better for me."
Princess Diana
Reply With Quote
  #8 (permalink)   Top
Old 18th November 2008, 07:37 PM
dudeking's Avatar
TST Expert
 
Join Date: Jul 2008, 583 posts.
Location: Nottingham, UK
Reputation: dudeking is on a distinguished road
Yeah, simple one user hard coded PHP passwords in my opinion are about the hardest to hack. Once they get any more complicated with databases and things and multiple users things like SQL injection can be used to hack them and with simple javascript ones, they can usually be hacked just by reading the source code.
Reply With Quote
  #9 (permalink)   Top
Old 18th November 2008, 08:35 PM
Rik's Avatar
Rik Rik is offline
TST Master
 
Join Date: Dec 2007, 2,107 posts.
Location: England
Reputation: Rik will become famous soon enough
For added protection you could rar all your files and set a password when you compress them.
__________________
"If at first you do not succeed, sit down, have a coffee, have a smoke, and think for a bit. If that still doesn't work, post it on TST".
Reply With Quote
  #10 (permalink)   Top
Old 8th December 2008, 10:29 AM
iTouch's Avatar
Newcomer
 
Join Date: Nov 2008, 23 posts.
Location: Hull, UK
Reputation: iTouch is on a distinguished road
It does work perfect thanks
Reply With Quote
  #11 (permalink)   Top
Old 8th December 2008, 05:33 PM
dudeking's Avatar
TST Expert
 
Join Date: Jul 2008, 583 posts.
Location: Nottingham, UK
Reputation: dudeking is on a distinguished road
Awesome!! let me know if u need any more help
Reply With Quote
Reply

Only registered members can participate in forum threads. You must register or log in to contribute.


Thread Tools

Forum Jump


All times are GMT. The time now is 01:54 PM.






Post A Question!
Useful Links
Main Menu
Home
Forum Rules
FAQ
About Us
Welcome Pack
Search the forums
TST Mobile
Contact Us
Send Message

These are the 8 most used thread tags
Tag Cloud
geforce modem monitor no ring response no signal nvidia soft modem win7