ulthane — 2012-10-02T05:02:17-04:00 — #1
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?
guido2004 — 2012-10-02T05:25:04-04:00 — #2
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.
ulthane — 2012-10-02T05:37:28-04:00 — #3
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.
cpradio — 2012-10-02T07:21:20-04:00 — #4
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).
mjpr — 2012-10-02T07:43:34-04:00 — #5
There are services that do what you want, like: http://builtwith.com/
ulthane — 2012-10-02T08:20:58-04:00 — #6
Well these are usefull but im looking for an acutal code i can add to my website to do that, any ideas?
cpradio — 2012-10-02T08:24:25-04:00 — #7
If you want to read it from the response headers, you will want to look at the get_headers() function
ulthane — 2012-10-02T09:34:54-04:00 — #8
Thanks, that does the trick