I've searched google for this and you would need to insert php code to find out the version, I don't think you can do that own a server you don't own. I was told that if I connect to a website through telnet it would tell me the php version was running on the server.
Create a php file with the following content: Code: <?php phpinfo(); ?> upload it to your server and open it in the browser to get all php details incl. version number displayed.
Try with the following command; # curl -I http://domain.com Output: HTTP/1.1 200 OK Date: Wed, 06 Jun 2012 03:42:54 GMT Server: Apache/2.2.16 (Debian) X-Powered-By: PHP/5.3.13-1~dotdeb.0 Content-Type: text/html
If you can't upload a php file to make phpinfo(), or if PHP information is hidden from headers by ServerTokens directive, there's still one way to get PHP version. Add ?=PHPE9568F36-D428-11d2-A769-00AA001ACF42 to any .php url. For example index.php?=PHPE9568F36-D428-11d2-A769-00AA001ACF42. It still could be hidden, but sometimes administrators forget to hide it If you see a guy with breadsticks - it's PHP 4.0.0 - 4.2.3 If you see a brown dog - it's PHP 4.3.0 - 4.3.10 If you see a black dog - it's PHP 4.3.11 - 4.4.6; or 5.0.4 - 5.1.2 If you see a rabbot - it's PHP 5.0.0 - 5.0.3 If you see a PHP logo - it's PHP 5.1.3 - 5.2.13 If you see a PHP elephant - it's 5.3.0 or newer