Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
blith
Client



Joined: Jul 18, 2003
Posts: 977

PostPosted: Mon Apr 19, 2004 9:27 am Reply with quote

so that no part of it can be accessed? I want to close for repairs and have an announcement to that fact. How would I do it? thanks!
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon Apr 19, 2004 11:55 am Reply with quote

I would take the easy approach. Modify mainfile.php to place this code right after any hacker trap code
Code:
if ($_SERVER['REMOTE_ADDR']!='127.0.0.2') die('Message');

Replace 127.0.0.2 and Message appropriately. This should catch 99%. I would also turn the login block and Forums off. As admin you can still access it.


Last edited by Raven on Mon Apr 19, 2004 1:47 pm; edited 1 time in total 
View user's profile Send private message
blith







PostPosted: Mon Apr 19, 2004 11:57 am Reply with quote

I received this error...

Code:
Parse error: parse error in /home/******/public_html/mainfile.php on line 16


Fatal error: Call to undefined function: get_lang() in /home/******/public_html/admin.php on line 35
 
AYK
Hangin' Around



Joined: Apr 03, 2004
Posts: 32

PostPosted: Mon Apr 19, 2004 12:07 pm Reply with quote

Why not rename the index.php with another one that says the site is under construction ?

But that's my lazy way... And ofcourse the site is still accessible, but you'd have to go and look for it.
 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Mon Apr 19, 2004 12:10 pm Reply with quote

If you have linked to various parts of sites which I do heavily then that is just not enough.
 
Raven







PostPosted: Mon Apr 19, 2004 12:11 pm Reply with quote

blith wrote:
I received this error...

Code:
Parse error: parse error in /home/******/public_html/mainfile.php on line 16


Fatal error: Call to undefined function: get_lang() in /home/******/public_html/admin.php on line 35
Then you have some kind of a syntax error. Make sure you copied it correctly and have 2 quotes, etc.
 
blith







PostPosted: Mon Apr 19, 2004 12:20 pm Reply with quote

I will do so... by the by what would the appropriate be instead of 127.0.0.2? Whatever my IP is, correct?
 
blith







PostPosted: Mon Apr 19, 2004 12:42 pm Reply with quote

It does not seem to be working. I do not know what to put in place of your numbers.
 
Raven







PostPosted: Mon Apr 19, 2004 1:27 pm Reply with quote

You need to put your IP address from your ISP.
 
blith







PostPosted: Mon Apr 19, 2004 1:35 pm Reply with quote

I understand. Can I put more than one IP in? What would the syntax be for that? Thank you!
 
Raven







PostPosted: Mon Apr 19, 2004 1:37 pm Reply with quote

Several ways but since your list will probably be small, just do something ike this
Code:
if ($_SERVER['REMOTE_ADDR']!='127.0.0.2' AND $_SERVER['REMOTE_ADDR']!='127.0.0.3' AND $_SERVER['REMOTE_ADDR']!='127.0.0.4') die('Message');


Last edited by Raven on Mon Apr 19, 2004 1:47 pm; edited 1 time in total 
blith







PostPosted: Mon Apr 19, 2004 1:41 pm Reply with quote

Yes my list would only be two so... I do not get the errors now but the site won't even let me in and I know I put in the right IP... interesting!! Laughing
 
Raven







PostPosted: Mon Apr 19, 2004 1:46 pm Reply with quote

OOPS! Sorry. Shoud be
Code:
if ($_SERVER['REMOTE_ADDR']!='127.0.0.2' AND $_SERVER['REMOTE_ADDR']!='127.0.0.3') die('Message');
I forgot I had reversed the logic to verify it Smile
 
blith







PostPosted: Mon Apr 19, 2004 2:01 pm Reply with quote

All right I think I have it now. Thank you for your time as usual Raven!! You are the bestest...
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©