Work with MySQL Sockets

This passes anything that is not a valid port (0<int<65535) as a unix socket.
I tested this with unix sockets; this needs to be tested with a non-standard mysql port as well but I don't foresee any issues.

To use a unix socket, even one different than PHP's mysql.default_socket..
* Database Host = localhost:/path/to/socket
I am using $socket as a string that hold whatever was after ':'
I am using $port as a boolean to know if I should pass $socket as an internet socket (AKA port) or a file socket.

I think I need both but if there is a better way, please clarify and I can try utilizing it. Thanks