I'd like to make a function which takes a url as a parameter (for example www.test.com) and checks what kind of programming language does this website uses (asp, aspx, php and so on).
Does anybody have any idea how can i achieve this?
Since all you'll get from a url is a HTML page, I think you will have to base yourself on the extension in the url of the page itself, or of any urls in the html code of the page that link to the same site.
I think you will have to base yourself on the extension in the url of the page itself
Well that was my first thought, but i've encountered many websites which hides their extensions, so i thought there might be any way around.
You can look for headers too. Don't forget many times a language will add a header to the response detailing information (granted this can be removed by the system admin).
For example, using Chrome, press F12 click on the Network tab, and refresh this page, click on showthread.php, make sure Headers is selected and look at the Response Headers (second to last one has X-Powered-By:PHP/5.3.2-1ubuntu4.18).
There are services that do what you want, like: http://builtwith.com/
Well these are usefull but im looking for an acutal code i can add to my website to do that, any ideas?
If you want to read it from the response headers, you will want to look at the get_headers() function
Thanks, that does the trick
This topic is now closed. New replies are no longer allowed.