Author |
Message |
blith
Client

Joined: Jul 18, 2003
Posts: 977
|
Posted:
Mon Apr 19, 2004 9:27 am |
|
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! |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Mon Apr 19, 2004 11:55 am |
|
I would take the easy approach. Modify mainfile.php to place this code right after any hacker trap codeCode: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 |
|
|
 |
blith

|
Posted:
Mon Apr 19, 2004 11:57 am |
|
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
|
Posted:
Mon Apr 19, 2004 12:07 pm |
|
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. |
|
|
|
 |
Raven

|
Posted:
Mon Apr 19, 2004 12:10 pm |
|
If you have linked to various parts of sites which I do heavily then that is just not enough. |
|
|
|
 |
Raven

|
Posted:
Mon Apr 19, 2004 12:11 pm |
|
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

|
Posted:
Mon Apr 19, 2004 12:20 pm |
|
I will do so... by the by what would the appropriate be instead of 127.0.0.2? Whatever my IP is, correct? |
|
|
|
 |
blith

|
Posted:
Mon Apr 19, 2004 12:42 pm |
|
It does not seem to be working. I do not know what to put in place of your numbers. |
|
|
|
 |
Raven

|
Posted:
Mon Apr 19, 2004 1:27 pm |
|
You need to put your IP address from your ISP. |
|
|
|
 |
blith

|
Posted:
Mon Apr 19, 2004 1:35 pm |
|
I understand. Can I put more than one IP in? What would the syntax be for that? Thank you! |
|
|
|
 |
Raven

|
Posted:
Mon Apr 19, 2004 1:37 pm |
|
Several ways but since your list will probably be small, just do something ike thisCode: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

|
Posted:
Mon Apr 19, 2004 1:41 pm |
|
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!!  |
|
|
|
 |
Raven

|
Posted:
Mon Apr 19, 2004 1:46 pm |
|
OOPS! Sorry. Shoud beCode: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  |
|
|
|
 |
blith

|
Posted:
Mon Apr 19, 2004 2:01 pm |
|
All right I think I have it now. Thank you for your time as usual Raven!! You are the bestest... |
|
|
|
 |
|