• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Only localhost can access phpMyAdmin

Now when I try to access it (From another computer) I just get nothing :P It's a white window :p Is it possible to make so 2 other ips can connect?
 
Change it to this:
PHP:
if($_SERVER['REMOTE_ADDR'] != '127.0.0.1' AND $_SERVER['REMOTE_ADDR'] != '##IP OF ONE COMPUTER##' AND $_SERVER['REMOTE_ADDR'] != '##IP OF SECOND COMPUTER##')
        exit(-1);

If you want 3 ips, you just add a AND $_SERVER['REMOTE_ADDR'] != '##IP OF COMPUTER##'
You get the drill ;D
 
Last edited:
Haha is it possible to make so theres a text if you're not the localhost or the other ips? :p Like

A random guy do: wofb.mine.nu/phpmyadmin
then:
HAHA JUST TRY NOOBAK! JULL NEVAH GET INTA DA DATABASEEEE MOAHAHAHHA!
 
Yeah!
PHP:
if($_SERVER['REMOTE_ADDR'] != '127.0.0.1' AND $_SERVER['REMOTE_ADDR'] != '##IP OF ONE COMPUTER##' AND $_SERVER['REMOTE_ADDR'] != '##IP OF SECOND COMPUTER##') {
    echo "Fuck you! Hope you die irl noob.";
    exit(-1);
}

Just change the text in there.
 
Last edited:
LOL

Because S_SERVER is not a variable xD $_SERVER is..
And dont remove the { and }

PHP:
   <?php if($_SERVER['REMOTE_ADDR'] != '127.0.0.1' AND $_SERVER['REMOTE ADDR'] != 'myip:P') {
echo "Hi";
exit (1-);
}
 
Dont remove the { and }
Only time you never use { and } is when your code is on a single line.

Example when not to use { and }
PHP:
if($noob == true)
echo "Noob";

Example when to use { and }
PHP:
if($noob == true) {
echo "Noob";
echo "HEHEEH";
}
 
And you are not able to view the page?
Does it show you the text? Try using this:
PHP:
$myip = $_SERVER['REMOTE_ADDR'];
if($myip != '127.0.0.1' AND $myip != 'YOUR IP') {
  echo "You are not able to access this site, IP: ".$myip;
  exit(-1);
}

And tell me if it shows the IP that you have written in for yourself.
 
Is there anything I can do to store the ip if someone tries to enter?
Like

PHP:
   <?php if($_SERVER['REMOTE_ADDR'] != '127.0.0.1' AND $_SERVER['REMOTE ADDR'] != 'myip:P') {
echo "Yo! You're ip (IP) has tried to access wofb.mine.nu/phpmyadmin you're ip is now stored in our database and all you're accounts and characters will now get deleted (joking). xD";
exit (1-);
}

or this

PHP:
<?php
$a = 10;
while ($a < 100) {
echo ' DIE! <br \> ';
}
?>
 
Back
Top