# IP ban

**URL:** <https://forum.kirupa.com/t/ip-ban/42169>\
**Category:** flash\
**Created:** [February 5, 2004, 11:37pm UTC](https://forum.kirupa.com/t/ip-ban/42169 "2004-02-05T23:37:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![cowkiller7](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@cowkiller7](https://forum.kirupa.com/u/cowkiller7)\
**Post date:** [February 5, 2004, 11:37pm UTC](https://forum.kirupa.com/t/ip-ban/42169/1 "2004-02-05T23:37:07Z")

</div>

How do I make it so that when one person ( I know their IP ) trys to play my game, it shows a screen that says something like Error?

I know their IP. What is PHP ? I have a web site.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 6, 2004, 12:32am UTC](https://forum.kirupa.com/t/ip-ban/42169/2 "2004-02-06T00:32:15Z")

</div>

i searched and found this:

[http://www.freewebmasterhelp.com/tutorials/htaccess/2](http://www.freewebmasterhelp.com/tutorials/htaccess/2)

it blocks the person from the site. So you could just put the game in a HTML site and by adding the IP ban found on that link, it will block them.

I hope this helps you  
🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 6, 2004, 12:56am UTC](https://forum.kirupa.com/t/ip-ban/42169/3 "2004-02-06T00:56:02Z")

</div>

If their IP is dynamic you won’t be able to block them without a bit of work. (See Google for help). If they have a static IP (an IP Address that always stays the same), then this will help:

You want to make sure that the server your website is on supports either of these programming languages:

PHP  
CGI  
ASP  
ColdFusion

You could even do it in Javascript, as a last resort.

What you would want to do is run an If Statement on the page that your flash movie is embedded. This page should be PHP, ASP or ColdFusion.

At the top of your page you would write something like this (PHP):

```php
<?
$ip = $_GET['userIP'];

IF ($ip == "67.81.104.32") {
	Header("Location: banned.html");
}
?>

```

If you have questions about this in ASP or ColdFusion, send me a message and I can help. There are also a lot of good tutorials on the web for something like this. [Google](http://www.google.com) is your friend.

Edit: Clarity

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 6, 2004, 1:20am UTC](https://forum.kirupa.com/t/ip-ban/42169/4 "2004-02-06T01:20:18Z")

</div>

Is there any way to make it show a page that looks like an error page for the people how are banned? (so it doesnt look like a banned them but the game just doesnt work ?)

My website host is [bravehost.com](http://bravehost.com). Do you know if this supports PHP ?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 6, 2004, 1:30am UTC](https://forum.kirupa.com/t/ip-ban/42169/5 "2004-02-06T01:30:14Z")

</div>

In my example above the user is sent to “banned.htm”. But it could just as easily be called something else, like “game2.htm” or any other name. On this page you could write a message saying that the game has been take down, or embed a different version of the game that doesn’t work.

It looks to me like Bravehost is one of those free hosting accounts, and they probably have limited Server Side scripting support (PHP, ASP etc).

Hmm… looking at their [hosting plans](http://www.bravenet.com/global/hosting_matrix.php), and assuming you’ve got a free account, it looks like they don’t support PHP or ASP ☹

That’s the one downside to using those “Free” sites, they’re usually pretty limited in what they offer.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 6, 2004, 1:50am UTC](https://forum.kirupa.com/t/ip-ban/42169/6 "2004-02-06T01:50:29Z")

</div>

I guess Ill forget this then

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 6, 2004, 7:26am UTC](https://forum.kirupa.com/t/ip-ban/42169/7 "2004-02-06T07:26:41Z")

</div>

Copy this to a text file.

\<Limit GET\>  
order deny,allow  
deny from 000.00.000.000  
\</Limit\>

Change (000.000.000.000) to whatever the ip is.

Save the file as .htaccess

Upload to the directory where your game is, if you upload to the root directory you’ll block that ip from the whole site.

If you want to remove the .htaccess at a later date and can’t see it, just create an empty .htaccess file and upload over the top of the old.

Dave.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 6, 2004, 5:20pm UTC](https://forum.kirupa.com/t/ip-ban/42169/8 "2004-02-06T17:20:29Z")

</div>

Will that work with his account? They don’t support CGI or PERL.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 6, 2004, 11:01pm UTC](https://forum.kirupa.com/t/ip-ban/42169/9 "2004-02-06T23:01:54Z")

</div>

Will it work for [www.bravehost.com](http://www.bravehost.com)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 7, 2004, 6:34am UTC](https://forum.kirupa.com/t/ip-ban/42169/10 "2004-02-07T06:34:10Z")

</div>

Well, you can try it 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 7, 2004, 3:18pm UTC](https://forum.kirupa.com/t/ip-ban/42169/11 "2004-02-07T15:18:11Z")

</div>

Ok thanks
