We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
password protecting help
Topic Started: Feb 25 2005, 06:01 PM (416 Views)
gsforum
Pro Gamer/Shinobi/Samurai
[ * ]
help!

I have a flash password box, but theres 1 problem. if u type in the web adress to the site that the box protects, u get there without a password. anyone know how to prevent this? i thnk u would use something like "if (The URL That u came from)= my site then goto (that other site) else goto (the password page)" thats 2 much visual basic though...its like screening the visitors so that only the 1s i want come in.
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar
Member
[ *  *  *  *  *  * ]
they cal that a referrer.

http://www.leave-me-alone.com/referrer.htm

should help you/
(or http://www.google.com referrer.
should tel you what you need
Offline Profile Quote Post Goto Top
 
JCink
Member
[ *  *  *  *  * ]
You can do it in PHP.

Code:
 

<?php
$postpassword = $_POST['thevariableofthetextboxinflash'];
if ($postpassword == "the_desired_password") {
echo " why hello! you got the password right! so you can see my secret st00f";
} else {
echo " Nope. Sorry. Not letting you in without the correct password";
}
?>


And in my experience in flash - it does not send a referrer when you POST from it.
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar
Member
[ *  *  *  *  *  * ]
and where exectly does that check if you come from the right url?
but yours works to.

(you can get through both, so use both if you want extra security)

can't remember how to get by JCink script right now, but thats not important
Offline Profile Quote Post Goto Top
 
gsforum
Pro Gamer/Shinobi/Samurai
[ * ]
well, the referer just tells me where ppl are coming from...(or thats what i got off of it, anyway) and the code that u posted looks like it will only do what my flashbox does...correct me if im wrong though... geez im a coding noob <_< oh well...thanks for the responses so far...
Offline Profile Quote Post Goto Top
 
JCink
Member
[ *  *  *  *  * ]
I am a bit unsure as to what you're saying.

I thought that, you'd created a box to type a password in using Flash MX, and that if the user gets the password right, it posts it to a webpage and it opens up if its right...

can you supply me any links?
Offline Profile Quote Post Goto Top
 
gsforum
Pro Gamer/Shinobi/Samurai
[ * ]
this is the link. click on member downloads, that will take u to the box. what i want to do is prevent ppl from getting to the download site by typing it in manually. i want them to have to type in the member id.
Offline Profile Quote Post Goto Top
 
JCink
Member
[ *  *  *  *  * ]
Ah I see exactly what you're doing here.

Allright, your host, which is geocities, you can't do what you need to do in order to get the result you want. You'll have to move to a PHP enabled host, like http://yahoo.com , very good hosting.

Geocities doesn't give you the right tools to do what you need. If you want, you can put the just members only page on yahoo.

What you need to do is not do the password checking in flash, let the PHP do the checking. Put this down for the button, wipe out everything you currently have:

on (release) {
var the_sent_id = varofyourmemberidbox;
getURL("http://yoursiteonyahoo/thephppage.php", "_self", "POST");
}

You need to adjust varofyourmemberidbox to the var of that textbox you type into in flash.

This'll POST it out to a webpage. Now take this, put it in a PHP file, and upload it. Have it geturl to this PHP page on your account at yahoo.

Code:
 

<?php
$the_sent_memberid = $_POST['the_sent_id'];
if ($the_sent_memberid == "Put the member ID number here") {
echo "Put all of the content you want protected here.";
} else {
echo "Nope. Sorry. Not letting you in without the correct password";
}
?>


This will protect the page. Unless they put the right password, it does not let the member in. They can't get in through the backdoor by just going to the URL either, they need to have a password.
Offline Profile Quote Post Goto Top
 
gsforum
Pro Gamer/Shinobi/Samurai
[ * ]
the only hosting i can find on yahoo is geocities... and can u please be a little more specific with the vars? like sub in usename, password, stuff like that. and thanks so much for helping me :/ :)
Offline Profile Quote Post Goto Top
 
gsforum
Pro Gamer/Shinobi/Samurai
[ * ]
god im such an idiot!!! :@ i can just make the whole thing a flash movie...thank u sosososososososo much for your help, even though it kinda confused me :/
Offline Profile Quote Post Goto Top
 
JCink
Member
[ *  *  *  *  * ]
gsforum
February 25, 2005 08:02 PM
the only hosting i can find on yahoo is geocities... and can u please be a little more specific with the vars?  like sub in usename, password, stuff like that.  and thanks so much for helping me :/  :)

How funny.

InvisionFree likes to censor there is a reason it's censored - so don't try and get around it

Thats why it showed up as yahoo.com

Oh well glad you got it anyways.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Technology Chat · Next Topic »
Add Reply