Jump to content

Hide a page?


ItsWesYo

Recommended Posts

There are a few things you could do...

 

If you have a User System, you could have it so only Administrators could view it.

 

OR

 

Do you know your IP address?

<?php
if ($_SERVER['REMOTE_ADDR'] == "Your IP address here") {
?>
All content within'
<?php
} else {
echo "This page is getting a revamp";
?>

OR

You could hide it with CSS and but then you wouldn't be able to view it. But that should be alright if you just want to display a message.

Link to comment
https://forums.phpfreaks.com/topic/60485-hide-a-page/#findComment-300877
Share on other sites

not the smartest idea if your ISP uses DDNS or some sort of IP pool leasing system

 

True, but it can really depend on what kind of site it is and who has access to it... If it's only for a short amount of time then I think it would be alright... but you can try something else.

Link to comment
https://forums.phpfreaks.com/topic/60485-hide-a-page/#findComment-300883
Share on other sites

this is a better idea,

make a page that sets a session like this

sessioner.php

<?php
session_start();
$_SESSION['access'] = "full";
?>

then on test.php

<?php
session_start();
if($_SESSION['access'] != "full"){
exit("Opps Not done yet");
}
?>

Just open up sessioner.php for your needs via chmod then simply lock it down after wards.

Link to comment
https://forums.phpfreaks.com/topic/60485-hide-a-page/#findComment-300886
Share on other sites

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.