PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
blith
Client


Joined: Jul 18, 2003
Posts: 977

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

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: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
blith
Client


Joined: Jul 18, 2003
Posts: 977

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

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
View user's profile Send private message Visit poster's website
AYK
Hangin' Around


Joined: Apr 03, 2004
Posts: 32

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

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
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

If you have linked to various parts of sites which I do heavily then that is just not enough.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
blith
Client


Joined: Jul 18, 2003
Posts: 977

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

I will do so... by the by what would the appropriate be instead of 127.0.0.2? Whatever my IP is, correct?
View user's profile Send private message Visit poster's website
blith
Client


Joined: Jul 18, 2003
Posts: 977

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

It does not seem to be working. I do not know what to put in place of your numbers.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

You need to put your IP address from your ISP.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
blith
Client


Joined: Jul 18, 2003
Posts: 977

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

I understand. Can I put more than one IP in? What would the syntax be for that? Thank you!
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
blith
Client


Joined: Jul 18, 2003
Posts: 977

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

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
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
blith
Client


Joined: Jul 18, 2003
Posts: 977

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

All right I think I have it now. Thank you for your time as usual Raven!! You are the bestest...
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum