Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I hope someone can help me, I have quite a simple question, but I don't know how to solve it.
I am writing a web spider for my degree dissertation, don't worry, I have used the RobotUA module, so it's nice a friendly to peoples web sites. The problem i'm having is trying to determine the type of files i'm retrieving.
For example, if I send a request for
http://www.php.net/index.php
I can easily tell this is a PHP file because it has a filename included.
But what if I send a request for
http://www.perlmonks.org/
how can I tell the files MIME type from just this?
Is there someway of returning the MIME type of file I am retrieving? Any help would be very appreciated, thanks Tom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: MIME types
by merlyn (Sage) on Mar 30, 2002 at 18:34 UTC | |
by shaolin_gungfu (Novice) on Mar 30, 2002 at 22:46 UTC | |
by Bobcat (Scribe) on Mar 31, 2002 at 02:34 UTC | |
by Ryszard (Priest) on Mar 31, 2002 at 03:29 UTC | |
by merlyn (Sage) on Mar 31, 2002 at 17:23 UTC | |
|
Re: MIME types
by JayBonci (Curate) on Mar 30, 2002 at 21:11 UTC |