473,387 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to disable direct page URL access in PHP

Hello,

i am sudhir deshmukh.

I am working on ERP Web based software, but i am facing a problem, like any user access the any page by using url.

So how can i disable the Page URL when the user does not access directly.

Please retrieve my problem. I need help
Apr 21 '14 #1
1 1865
koharu
10
Ok, well... There are a few methods I can think of.

Method 1;
Validate the $_SERVER['HTTP_REFERER'] (This can be spoofed, so it isn't fool-proof)

Method 2;
Use Includes within your index.php file (structure your index.php file as a gateway file) and in all files being included, validate that a specific variable has been passed. If it hasn't, spoof an error 404 with PHP.

Method 3;
Use Apache Mod_Rewrite to block access to certain php files.
May 5 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Derek White | last post by:
Ok here's the deal. We are finally getting DSL again... but our PC is in the living room... and the youngest has figured out that if he hits the right keys... he can bring up Internet Explorer....
3
by: Colin Finck | last post by:
Hello! I need to backup a MySQL database (MySQL 4.0). But it is on a shared-hosting web server and so I don't have direct server access. I also have no phpMyAdmin installed. How can I backup the...
1
by: Markus Stehle | last post by:
Hi all! Within my web applikation I would like to centrally manage page access rights. Users of my web application belong to certain departments and have certain roles. The departments and roles...
7
by: Chris Fulstow | last post by:
Hi, I need to restirict access at the page level to a range of IP addresses. What's the best approach? I thought of building an HTTP module that could compare the requesting IP with a...
6
by: luqman | last post by:
I have created a Login Page with Master.Master Page. The master page contains Menus, and I want to disable those menus on Login Page, how can I ? Best Regards, Luqman
1
by: =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post by:
I would like to gray out or disable all of page content while a pannel is visible and active. I know there is a way to do this. psudo code 1. click "Join" 2. display panel and disable all other...
1
by: Chase Kang #52 | last post by:
I have a web application using custom authentication and role management, which seems to work properly. I also have a web config file with the following: <location path="systems"> <system.web>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.