This works for me:
curl -I http://websitename.com
Which shows results like this or similar including the PHP version:
HTTP/1.1 200 OK
Date: Thu, 13 Feb 2014 03:40:38 GMT
Server: Apache
X-Powered-By: PHP/5.4.19
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Cache-Control: no-cache
Pragma: no-cache
Set-Cookie: 7b79f6f1623da03a40d003a755f75b3f=87280696a01afebb062b319cacd3a6a9; path=/
Content-Type: text/html; charset=utf-8
Note that if you receive this message:
HTTP/1.1 301 Moved Permanently
You may need to curl the www version of the website instead i.e.:
curl -I http://www.websitename.com
Answer from Neil Robertson on Stack OverflowThis works for me:
curl -I http://websitename.com
Which shows results like this or similar including the PHP version:
HTTP/1.1 200 OK
Date: Thu, 13 Feb 2014 03:40:38 GMT
Server: Apache
X-Powered-By: PHP/5.4.19
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Cache-Control: no-cache
Pragma: no-cache
Set-Cookie: 7b79f6f1623da03a40d003a755f75b3f=87280696a01afebb062b319cacd3a6a9; path=/
Content-Type: text/html; charset=utf-8
Note that if you receive this message:
HTTP/1.1 301 Moved Permanently
You may need to curl the www version of the website instead i.e.:
curl -I http://www.websitename.com
I use redbot, a great tool to see the PHP version, but also many other useful infos like headers, encoding, keepalive and many more.
Try it on
http://redbot.org
I love it!
I also up vote Neil's answer: curl -I http://websitename.com
How can I find the version of PHP that is running on a website?
How to check PHP version?
How do I check the PHP version of a website?
What is PHP?
Why do I need to know the PHP version of a website?
Videos
hi, I'm new to PHP.
I want to change display_errors to On for debugging, but see many PHP versions installed.
I thought going to http://localhost/first/index.php?language=English&page=phpinfo would give me the version , but it just renders the regular index page.
Ty.