in reply to •Re: MIME types
in thread MIME types

thanks for the response,

yeah I thought I probably got the MIME types thing a bit confused, so I guess the MIME type just tells the type of document right, i.e. the content type. "There is no necessary correlation between a URL and the content type it serves." ok I got that, but unfortunately I still have my problem...

you see i'm trying to find out the different technologies that are used on different sites, i.e. the number of sites using Perl/PHP/ASP, I can tell this by the file extension, i.e. index.php or index.pl or index.asp etc, so if I just send a request for http://www.google.com/ how can I get the extension of the file it returns...? I just need to get the filename of the returned file, or something like that, if anyone knows a better way to do this great :-)

I hope that made my question a little clearer, thanks again!

btw, is it true that Perl is the only programming language that looks the same before and after RSA encryption?! :-)

Replies are listed 'Best First'.
Re3: MIME types
by Bobcat (Scribe) on Mar 31, 2002 at 02:34 UTC
    Keep in mind that the extension isn't a guarantee that the site is running NT, ASP, straight HTML, JSP or your favorite other technology; it's very easy to tell Apache, for example, that all files ending with ".asp" should be parsed as PHP files.

    Not only that, but using a module like HTML::Mason preparses HTML files. I believe this is the recommended functionality.

Re: Re: ?Re: MIME types
by Ryszard (Priest) on Mar 31, 2002 at 03:29 UTC
    Just to be a little different once, i went and renamed all my .pl CGI's to .html.

    I dont think there is any clear and definitive method of determining what technology a site actually uses.

    The answer to your second question, nope, machine code... :-)

•Re: Re: •Re: MIME types
by merlyn (Sage) on Mar 31, 2002 at 17:23 UTC
    I can tell this by the file extension
    No, you can't. Please stop hallucinating. The information you want is not available.

    -- Randal L. Schwartz, Perl hacker