Fixing PHPMyAdmin & Database Connection working slow on windows 8

Hi there guys, today I’m going to tell you a little trick on how to fix a problem which many of you coders have with windows 8.I had that problem too and I was very annoyed by the fact that PHP My Admin was working so slow almost 2 seconds delay, which is extremely slow.

I’m not sure why it has a 1 second delay for every query but I know how to fix this.Instead of using “localhost” on your connection to mysql, use “” and you will get rid of the delay. For example :

Use this:


Instead of this:

If you want to fix the delay on PHP My Admin you need to find this file and edit it ( xampp/phpMyAdmin/ )

Add this line at the bottom of the page

And thats it, thanks for reading my tutorial and I hope it helps !


Generating a random color with PHP

Hi there, today I’m going to give you a quick snippet that will maybe help you in your future or current projects in PHP.You could use multiple methods on generating random HTML color codes with PHP, but today I’m going to teach you 2 ways of doing it.First one is this:

and the second one is inspired from another website which I found some time ago.

there you have it, 2 snippets on random coloring codes for HTML.You can use them by calling out the function, just like this:

Example of output:



PHP Ip to country script

Hi there guys, today I’m going to give you a quick function that is very useful to determine what country does an ip has.

This is a function that works for both IP’s and domain names.This function is using a free API called wipmania, whenever this API is down or it doesn’t locate the country it will output “xx”.Thanks, and I hope this will help you !


PHP Check if port is opened

Hi there, I know I haven’t posted so much later but I got something for you today.A little php snippet that will help you check if a specific port is opened on a specific IP or domain.Here you go, made this specially for you guys, hope this will help you somehow.



How to easily read lines from a text file with PHP

Today I’m going to give you a very quick and simple php snippet or function which reads every line of a .txt file and returns them into an array.For example, you have this text file called countries.txt with the following content:


You can read them very easily with PHP with an integrated function called file() that requires 1 parameter, the file location of the .txt.

this will output something like:

Array ( [0] => Romania [1] => Russia [2] => Germany [3] => Bulgaria )

Thanks for reading this quick and simple tutorial.


Block multiple IP addresses with PHP

Today I’m going to give you a quick and very useful snipped on how to block multiple IP addresses with PHP.

First off you will have to implement this custom function in your code, preffered in the file that initializes the script.

After that, you need to define an array which contains the ip’s you want to block and then call out the function with the array parameter.

add this code to your header so that every page the specific user access, he will be blocked and will get this message:

Your IP( has been blocked !

Thanks for reading my mini tutorial, enjoy.