Answer the question
In order to leave comments, you need to log in
How to determine content type by URL?
Good afternoon!
There is such a link to the radio: http://roks.com:8000/live
In the browser and in the player it is reproduced without problems.
The task is how to determine the HTTP request or some other method that this is a link to a stream with sound (radio)?
I try like this:
telnet roks.com 8000
GET /live HTTP/1.1
HTTP/1.1 400 Bad Request
Server: nginx/1.4.6 (Ubuntu)
Date: Tue, 17 Feb 2015 11:11:25 GMT
Content-Type: text/html
Content-Length: 181
Connection: close
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question