Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ban Script
#11
Isn't that I have posted the index.php , ip.txt on the post above your post?

For the bans.php,I copy 100 % from the thread because I feel that there is nothing for me to edit.

Is there anything I do wrongly?

Thanks.
Reply
#12
(10-21-2009, 09:28 AM)ethical_john Wrote: Isn't that I have posted the index.php , ip.txt on the post above your post?
For the bans.php,I copy 100 % from the thread because I feel that there is nothing for me to edit.
Is there anything I do wrongly?
Thanks.

No you didn't do anything wrong, if you did copy the PHP code.
I have used your HTML file and your IP.txt and the PHP code from the first page/post and it redirects me to google.com.

Do you get any error messages?
Reply
#13
I do not get any error message.

It show me the message I put in index.php which is "Welcome People".

If I block myself using 127.0.0.1,by theory,"Welcome People" should not show up right?
Reply
#14
(10-21-2009, 09:34 AM)ethical_john Wrote: I do not get any error message.
It show me the message I put in index.php which is "Welcome People".
If I block myself using 127.0.0.1,by theory,"Welcome People" should not show up right?

WHat PHP/Apache version are you running?
Try replacing the line in the bans.php
PHP Code:
header("Location: http://google.com/"); 

to
PHP Code:
die("You are banned!"); 
Reply
#15
I still get the same result.

I still can see the message "Welcome People" on my screen.

I examine the script again and feel that there is no problem.

But how come I still cannot get the desire result.

Weird.

Any possible solution?
Reply
#16
(10-21-2009, 09:52 AM)ethical_john Wrote: I still get the same result.
I still can see the message "Welcome People" on my screen.
I examine the script again and feel that there is no problem.
But how come I still cannot get the desire result.
Weird
Any possible solution?

OK I have a last one on my mind....
replace
PHP Code:
$_SERVER['REMOTE_ADDR'

with
PHP Code:
$_SERVER['SERVER_ADDR'
Reply
#17
Still get the same result.

I am running this server locally.

I do not do any port forward at the router.

Will this affect the desire result?
Reply
#18
(10-21-2009, 10:02 AM)ethical_john Wrote: Still get the same result.
I am running this server locally.
I do not do any port forward at the router.
Will this affect the desire result?

No I don't think that it would affect the result, but I may be wrong!
I can't think of anything that would solve your problem.
just look what result $_SRVER returns.
PHP Code:
print $_SERVER['REMOTE_ADDR']."<br />".$_SERVER['SERVER_ADDR']; 

The output should be 127.0.0.1 2 times.

If it is, you either have problem with file functions or something in bans.php isn't right.

Try reinstalling/upgrading your local server. dunno.
Reply
#19
I do not need to install anything.

I download a file called XAMPP.

Inside that package,got Apache and MySQL.

The one you have require installation?
Reply
#20
(10-21-2009, 10:25 AM)ethical_john Wrote: I do not need to install anything.
I download a file called XAMPP.
Inside that package,got Apache and MySQL.
The one you have require installation?

XAMPP is good but I don't like it.
And xampp should also be a installation not a single file.

If you use windows try installing WAMP... that's what I have and the script is working perfectly.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  php form script with upload script help andrewjs18 4 3,341 10-07-2010, 11:46 AM
Last Post: JMK940
  Auto Ban IP's & Host's zone 2 1,189 11-06-2009, 09:15 PM
Last Post: zone

Forum Jump:


Users browsing this thread: 6 Guest(s)