SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2010
    Location
    Israel
    Posts
    523
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    get remote website programming language

    hello everyone,
    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?
    ps. if its doable with javascript aswell, i'd like to know.

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,496
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    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.

  3. #3
    SitePoint Evangelist
    Join Date
    Jun 2010
    Location
    Israel
    Posts
    523
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,127
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    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).

  5. #5
    SitePoint Zealot
    Join Date
    Feb 2005
    Location
    Aveiro, Portugal
    Posts
    164
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    There are services that do what you want, like: http://builtwith.com/

    HTH
    Yours truely
    Mário Ramos

  6. #6
    SitePoint Evangelist
    Join Date
    Jun 2010
    Location
    Israel
    Posts
    523
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Well these are usefull but im looking for an acutal code i can add to my website to do that, any ideas?

  7. #7
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,127
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    If you want to read it from the response headers, you will want to look at the get_headers() function

  8. #8
    SitePoint Evangelist
    Join Date
    Jun 2010
    Location
    Israel
    Posts
    523
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks, that does the trick


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •