Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ban Script
#21
From the script you gave me just now.

There is 2 127.0.0.1 IP addresses print out on the screen.

Therefore,I guess there is nothing wrong with the script.
Reply
#22
(10-21-2009, 10:33 AM)ethical_john Wrote: From the script you gave me just now.
There is 2 127.0.0.1 IP addresses print out on the screen.
Therefore,I guess there is nothing wrong with the script.

I'm sorry but that goes out of my knowledge.
Looks like you have some problems with your Local Server, with the script is nothing wrong....
Like I said try installing WAMP and test it again, if it's the same result, I will probably go and kill my self.... ahhhh I don't know sorry!

edit: before installing WAMP uninstall XAMPP.
Reply
#23
I have solve the problem.

This is the script I have posted at first:

Quote:<html>
<body>

<?php
include("bans.php");
?>

<p>
Welcome People !
</p>
</body>
</html>

What I do is :

Quote:<?php
include("bans.php");
?>

<html>
<body>

<p>
Welcome People !
</p>
</body>
</html>

Can you spot the mistake I have made?

Thanks you anyway for the hard work trying to help me.
Reply
#24
(10-21-2009, 10:41 AM)ethical_john Wrote:
Omg
Holy ****ing crap..... That was easy.
That wasn't on my mind since your original did work for me, ahhh glad you did it...
Omg

edit:

anyway start writing your HTML inside PHP

PHP Code:
print '<html>';

// OR

print <<<HEAD
<html><head>......
HEAD; 
Reply
#25
Haha...

My original script works for you?

Maybe my version of Apache is more sensitive than your Apache server.
Reply
#26
If you had error_reporting on you probably would have seen why it didn't work. Which is that you can't add the header() function once the page content is served. You would get the "Header Already Sent" error.
Superman I am here to rescue you.
This is Support Forums not Support PMs.  Do not PM me for support unless it's private and site related.
Reply
#27
(10-21-2009, 11:04 AM)Omniscient Wrote: If you had error_reporting on you probably would have seen why it didn't work. Which is that you can't add the header() function once the page content is served. You would get the "Header Already Sent" error.

Ugh, Omniscient beat me to it; but yea that's just a HTTP protocol restriction and the only way of fixing it is make sure no content will be served before you use header()...putting at the VERY start of the page helps.
[Completely Honest. Seriously.]

Protip: Anonymous Reputation Points are for Pussies
Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)