2005-09-11 03:53:54

Hi,
I was wondering: 1. How do you ban IP addresses from a website? I

would like to know how to do do that to people who cause problems lol

Anyway...2. If you've seen our site you'd have seen the navigation bar,

how would you integrate it into each page from a different HTML file i.e.

without having to write <h2>Navigation</h2><li>...etc. on every page? To

just write a sourcee file such as navbar.html? Could someeone reply as

quickly as possible with answers? Thank you a real lot.

Regards,
Mike
Co-Founder, RS Games
www.rsgames.org

2005-09-11 14:07:37

hello,

why don't you just coppy the <h2> and then </h2>
and then the

li> thing in every page,

i mean to coppy the link address in every page

2005-09-11 14:29:56

The answer to your second question is found in active server pages or .asp.

The #include tag is employed. Of course your webhost needs to be able handle

active server pages. For more information on how to use ASP to write pages:

http://www.w3schools.com/asp/asp_incfiles.asp

Your first question is a

little more complicated as it takes a complete script to handle the issue.

You will need to be able to host a database and write code to first

determine the IP# of the computer accessing your page and then compare that

to the database. Some webhosts have this function as part of the package you

pay for.

2005-09-11 18:28:45

Hi

Myke,
You need to find out whether your hoster supports PHP or another

scripting language. Then you will need to build a database of banned IPs,

and have the page in question from which the individual is banned check

their IP against the database. As for your second question, you can do it

pretty easily with Javascript. Now, I hope none of this is translated into

any real stuff but I'll do my best. You need to do something like

this:

1. Create a *.js file in which you write the script that will

create the navigation bar. For

instance:
<script>
window.document.writeln("<h2>Navigation</h2>");
window

.document.writeln("<a

href='http://www.freeweb.com/youruser/webpage.htm'>Home</a>");
document.w

riteln("<a href='http://www.freeweb.com/pagename.html'>Next

entry</a>");
window.document.writeln("...");
...
</script>

Notice that

instead of putting:
<a href="url"></a>
We put:
<a href='url'></a>
This

is because quotes were used on the outside so we use ' on the inside. Make

sure you take careful note of this.
2. Once you have this *.js file up, you

need to link it within every page on which you want the navigation bar to

appear. You do this by:
<html>
<head>
<title>My Home

Page</title>
</head>
<body>
<!-- We want the bar to appear here so link

the page -->
<script src="URL_to_JS_file">
</script>
...page

content...
</body>
</html>
HTH,
Munawar

2005-09-11 19:09:14

Thanks, but one question. How do you make the navigation in to a list like

<li> and stuff?

Regards,
Mike
Co-Founder, RS Games
www.rsgames.org

2005-09-12 12:02:26

You'd just write it into that script. For instance, your .js file would

look something like:
<script>
window.document.writeln("<ul>"); //begin

list
window.document.writeln("<li>first

link");
window.document.writeln("<li>second

item");
...
window.document.writeln("</ul>"); //end the

list
</script>
HTH,
Munawar

2005-09-12 23:54:01

Hey

do you have to use the </li> tag in my js? Thanks.

Regards,
Mike
Co-Founder, RS Games
www.rsgames.org

2005-09-13 01:10:41

No,

the </li> is optional. I never use it.

2005-09-13 09:53:18

You

can't reliably ban IP addresses. People on dial up have random IPs, and

people on always on connections can quite easily change IP, or sometimes

have semi static IPs that change every few months. All someone would have to

do is get their computer to renew their IP for a broadband link and bingo,

new IP.

cx2
-----
To live by honour and to honour life, these are our greatest strengths and our best hopes.

2005-09-13 22:14:19

You

can't. I have a broadband and I tried everything I could to renew my IP but

i couldn't.

Regards,
Mike
Co-Founder, RS Games
www.rsgames.org

2005-09-13 22:37:20

Hi,
I did every thing you told me to do for the js

script:
<script>
window.document.writeln("<h2>Site

Navigation</h2>");
window.document.writeln("<ul>");
window.document.writel

n("<li><a

href='index.html'>Home</a></li>")
window.document.writeln("<li><a

href='games.html'>Our games</a></li>")
window.document.writeln("<li><a

href='contact.html'>Contact Us</a></li>")
window.document.writeln("<li><a

href='ref.html'>Useful

Links</a></li>
window.document.writeln("</ul>")
</script>
Then I went to

index.html and put in:
<script>src="navbar.js"
</script>
and my navbar

didn't appear! and, navbar.js and index.html are in the same directory on

my hard drive! What could be wrong?
Thanks

Regards,
Mike
Co-Founder, RS Games
www.rsgames.org

2005-09-13 22:38:09

Oh

yes you can, believe me.
Being site staff on PRPG, we deal with shifting

IP addresses all the time when tracking scammers, ToS abusers and the like.

An IP ban is seldom called for, but we've had one user, in particular, get

around it six or seven different times using the same computer.
It's not

terribly easy, but the thing about dialup is totally correct...nonstatic IP

and all that?
Good luck if you want to keep people off your site, I'm

afraid.
Oh...and you might consider your image if you try and keep people

away that way? Besides...what "problems" can they do to your site? It's

hard to access a secure site from outside a server, is it not? You'd be the

one in control, so I don't know precisely what you're worried about.

Check out my Manamon text walkthrough at the following link:
https://www.dropbox.com/s/z8ls3rc3f4mkb … n.txt?dl=1

2005-09-13 23:49:54

Mike wrote:

Hi,

Then I went to index.html and put

in:
<script>src="navbar.js"
</script>
and my navbar didn't appear! and,

navbar.js and index.html are in the same directory on my hard drive! What

could be wrong?
Thanks

If you copied and pasted this might fix the

error: <script src="navbar.js"> </script>
Note you closed the <script> tag

before inclusing the src=

I didn't look to closely at everything else,

this just jumped out at me.

2005-09-14 01:49:47

No,

doesn't work.

Regards,
Mike
Co-Founder, RS Games
www.rsgames.org

2005-09-14 13:49:18

On the

IP thing it depends on your ISP. I have a sighted friend with an ADSL

provider here in the UK, and he found since he was regularly making large

downloads on an alledgedly unlimited download service the company got around

it by increasingly randomly dropping his link. He got around it by renewing

his IP address, I don't think I can do it with my ISP but I know he's done

it with his.

cx2
-----
To live by honour and to honour life, these are our greatest strengths and our best hopes.

2005-09-14 23:01:16

Mike,
Try this:
Copy and paste the following into your JS file. Note that

I've put a semicolon after every line save the "{" and

"}":
<script>
function writeNav(){
window.document.writeln("<h2>Site

Navigation</h2>");
window.document.writeln("<ul>");
window.document.writel

n("<li><a

href='index.html'>Home</a></li>");
window.document.writeln("<li><a

href='games.html'>Our games</a></li>");
window.document.writeln("<li><a

href='contact.html'>Contact

Us</a></li>");
window.document.writeln("<li><a href='ref.html'>Useful

Links</a></li>");
window.document.writeln("</ul>");
}
</script>

Then

in your page for the navigation bar, between <head> and </head>,

type:
<script src="nav.js">
</script>
In your body tag you'd type (where

you want the navigation bar to

appear):
<script>
writeNav();
</script>
So that it'd look

like:
<html>
<head>
<script src="nav.js">
</script>
<title>title of

page</title>
</head>
<body>
<script>
writeNav();
</script>
page

content here...
</body>
</html>


Also, I noticed an error with your

script that might have been causing the bar not to

appear:
window.document.writeln("<li><a href='ref.html'>Useful

Links</a></li>
Should be changed to:
window.document.writeln("<li><a

href='ref.html'>Useful Links</a></li>");
I changed it for you in the new

script I've written above so just copy and paste the entire script into

your js file.
HTH,
Munawar