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
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
i searched and found this:
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
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):
<?
$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 is your friend.
Edit: Clarity
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. Do you know if this supports PHP ?
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, 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.
I guess Ill forget this then
Thanks
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.
Will that work with his account? They don’t support CGI or PERL.
Will it work for www.bravehost.com
Well, you can try it
Ok thanks
:: Copyright KIRUPA 2024 //--