Hi,
We disallow server-side connections to non-standard ports. This means that your script would not be able to communicate with port 25565 or similar. While there are ways of working around this, this means a PHP script would not be able to communicate with a Minecraft server.
Thank you,