Jump to content

Stop people from viewing php files


DylanD

Recommended Posts

I have a bunch of php scripts that get information from a database then mark it up in XML.

 

I want to prevent random people from running these pages and being able to look at the XML.

 

How do you accomplish this while still allowing my flex app to see them?

 

Thanks in advance

Dylan

Link to comment
Share on other sites

What about a basic form and code eg.

 

if($_REQUEST[pass]!=USERSCHOSENPW && $_REQUEST[user]!=USERSCHOSENUSER){

die();

}
else

{

//echo

}
?>
<html>
<form action="" method=post>
<input type=password name=pass>
<input type=text name=user>
<form>

BTW i did leave the textbox without any labels any purpose as it increses security a pinch as a person wont know which is which although i wouldnt recomend that on a client side login.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.