Jump to content
MakeWebGames

Will

Members
  • Posts

    215
  • Joined

  • Last visited

    Never

Everything posted by Will

  1. Re: Best Security [Made by me] It wouldn't be a "Free Game Modification" then would it??? Maybe a level of thought would help before posting anywhere?
  2. Re: IP Banning tool [V1] + [V2] Does the folder exsist? Is the folder CHMOD: 777?
  3. Re: IP Banning tool [V1] + [V2] (I think)   Explain
  4. Re: IP Banning tool [V1] + [V2] (I think) You didn't change the permissons of the ipbans folder...
  5. Re: IP Banning tool [V1] + [V2] (I think) Has anyone tested it on V2?
  6. Re: IP Banning tool [v1]   I think it will work without changes; there are no database functions or full pages.
  7. Will

    WWII

    Re: WWII Germany - 1 Italy - 20 Japan - 19 Great Britain - 39 United States - 21 Soviet Union - 21 France - 19
  8. All pages on V1 have some script which checks to see if a file exists in the "ipban" folder which is the IP of the users browsing. If so it then blocks them. This tool goes into the admin panel which allows you to add and remove IP bans. In admin.php: function ipban() { ?><h3>Ban an IP</h3> <form action='admin.php?action=ipbancon' method='post'> <input type="text" name="ip" /> <input type='submit' value='BAN!' /></form> <hr width="50%" /> [url="admin.php?action=ipbanview"][b]Click to view current IP bans[/b][/url] <? } function ipbancon() { $filename='/home/USER NAME/public_html/ipbans/'.$_POST['ip']; $file=fopen($filename,w) or die("Error Creating File"); fclose($file); ?>Done [url="admin.php?action=ipbanview"][b]Back[/b][/url]<? } function ipbanview() { $dir = "/home/USER NAME/public_html/ipbans/"; ?> <h3>Viewing banned IP's</h3> <table border="1"> <tr> <th> IP </th> <th> Delete? </th> </tr><? if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if (strlen($file)>4) { ?> <tr> <td> <? echo $file; ?> </td> <td> [url="admin.php?action=ipbanremove&ip=<? echo $file; ?>"][b]Delete[/b][/url] </td> </tr> <? } } closedir($dh); } } ?></table> [url="admin.php"][b]Back[/b][/url] <? } function ipbanremove() { $file=$_GET['ip']; $filepath = "/home/USER NAME/public_html/ipbans/".$file; if (! unlink ($filepath)) { echo "Couldn't delete file"; } else { echo "Removed IP: ".$file; } ?> [url="admin.php?action=ipbanview"][b]Back[/b][/url]<? } You need to change the USER NAME part to your hosting username. If you use cpanel it will be that username. Add the cases: case 'ipban': ipban(); break; case 'ipbancon': ipbancon(); break; case 'ipbanview': ipbanview(); break; case 'ipbanremove': ipbanremove(); break;   And the links   [[url='admin.php?action=ipban'][b]Ban an IP[/b][/url]] [[url='admin.php?action=ipbanview'][b]View Banned IP's[/b][/url]]   If you don't have to code to check the ip here it is: For the login + register pages etc: $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { die("[b]<font color='red' size='+1'>Your IP has been banned, there is no way around this.</font>[/b]</body></html>"); } Put is somewhere near the top. In header.php put it in an appropriate place. Mine is under the crimeexp checking part:   if(file_exists('ipbans/'.$ip)) { die("[b]<font color='red' size='+1'>Your IP has been banned, there is no way around this.</font>[/b]</body></html>"); }   It is likely you already have the IP checking code there, so check first. It is tested and works, any problems reply to this topic. You need to make the ipbans folder CHMOD: 777
  9. Re: Better than Quantifying The point of this is that you don't have to do loads of queries and running an in-efficient script every time the user looks at their inventory.
  10. Will

    WWII

    Re: WWII Germany - 11 Italy - 19 Japan - 20 Great Britain - 33 United States - 19 Soviet Union - 19 France - 19
  11. Will

    Optimize generation

    Re: Optimize generation Any Ideas?
  12. Will

    WWII

    Re: WWII Germany - 17 Italy - 19 Japan - 20 Great Britain - 26 United States - 20 Soviet Union - 19 France - 19
  13. Will

    WWII

    Re: WWII Nah. Too confisusing. Just play This one. Germany - 18 Italy - 20 Japan - 20 Great Britain - 24 United States - 20 Soviet Union - 19 France - 29
  14. Will

    WWI

    Re: WWI Use the new WWII Topic. Too many pages otherwise. More Teams This time!
  15. Will

    WWII

    Re: WWII Better this way. Less Pages... Germany - 19 Italy - 20 Japan - 20 Great Britain - 22 United States - 20 Soviet Union - 19 France - 20
  16. Re: Counting (nr game) 1769
  17. Will

    WWI

    Re: WWI I have made a WWII! Topic
  18. Will

    WWII

    Now that WWI has been won by Great Britain. Time For the Second WW. The countries are: Each Country starts with 20 points. When you take one from one country you must add it to the other. The start: Germany - 20 Italy - 20 Japan - 20 Great Britain - 20 United States - 20 Soviet Union - 20 France - 20
  19. Will

    WWI

    Re: WWI Germany-0 Great Britan-100! Great Britain Is Victorious Once More!
  20. Will

    WWI

    Re: WWI Germany-3 Great Britan-97
  21. Re: Guess the next poster Yep Ghetto Next
  22. Will

    WWI

    Re: WWI Germany-6 Great Britan-94
  23. Re: Counting (nr game) 1766
  24. Will

    WWI

    Re: WWI Germany-8 Great Britan-92
  25. Re: Guess the next poster No! YoungGold next
×
×
  • Create New...