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
https://forums.phpfreaks.com/topic/75832-stop-people-from-viewing-php-files/
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.