Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8304507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:52:00+00:00 2026-06-08T17:52:00+00:00

I am trying to get an HTML page source content from this site: http://207.200.96.231:8008

  • 0

I am trying to get an HTML page source content from this site: “http://207.200.96.231:8008” using Java. However the default libraries of Java did not help me in this one. I also tried using this tutorial, but it did not work either. I think the problem occurs because of a security protection of the site. When I run the following code provided below I get an exception: java.io.IOException: Invalid Http response.

Any ideas of how to implement the code? Or are there any libraries that can serve my need? So far I have tried JSoup and Jericho HTML Parser thinking that they would use a different approach connecting to the site I provided, but they also failed to work too.

String urlstr = "http://72.26.204.28:9484/played.html";

try {

    URL url = new URL(urlstr);

    URLConnection urlc = url.openConnection();

    InputStream stream = urlc.getInputStream();
    BufferedInputStream buf = new BufferedInputStream(stream);

    StringBuilder sb = new StringBuilder();

    while ( true){

    int data = buf.read();

    if ( data == -1)
        break;
    else
        sb.append((char)data);
    }

    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
}

EDIT (Problem Solved): With the help of Karai17 and trashgod I managed to solve this issue. Shoutcast page needs a user-agent to access its contents. So all we need to do was to add this code:

urlConnection.setRequestProperty("User-Agent", "Mozilla/5.0");

The latest code looks like this:

try {
        URL url = new URL("http://207.200.96.231:8008/7.html");
        HttpURLConnection urlConnection = (HttpURLConnection)url.openConnection();
        urlConnection.setRequestProperty("User-Agent", "Mozilla/5.0");

        InputStream is = urlConnection.getInputStream();
        BufferedInputStream in = new BufferedInputStream(is);
        int c;
        while ((c = in.read()) != -1) {
            System.out.write(c);
        }
        urlConnection.disconnect();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:52:03+00:00Added an answer on June 8, 2026 at 5:52 pm

    This stream appears to require Winamp.

    $ curl -v http://207.200.96.231:8008
    * About to connect() to 207.200.96.231 port 8008 (#0)
    *   Trying 207.200.96.231... connected
    * Connected to 207.200.96.231 (207.200.96.231) port 8008 (#0)
    It appears to require [Winamp][2].
    
    > GET / HTTP/1.1
    > User-Agent: curl/...
    > Host: 207.200.96.231:8008
    > Accept: */*
    > 
    ICY 200 OK
    icy-notice1:
    This stream requires Winamp
    icy-notice2:SHOUTcast Distributed Network Audio Server/Linux v1.9.93atdn
    icy-name:Absolutely Smooth Jazz - SKY.FM - the world's smoothest jazz 24 hours a day icy-genre:Soft Smooth Jazz icy-url:http://www.sky.fm/smoothjazz/ content-type:audio/mpeg icy-pub:1 icy-br:96 ...

    Addendum: You can read the stream like this:

    URL url = new URL("http://207.200.96.231:8008");
    URLConnection con = url.openConnection();
    InputStream is = con.getInputStream();
    BufferedInputStream in = new BufferedInputStream(is);
    int c;
    while ((c = in.read()) != -1) {
        System.out.write(c);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to fetch the html source from this usl: http://books.google.com/books?id=NZlV0M5Ije4C&dq=isbn:0470284889 I used
I'm trying to get the HTML source in a string from a web site
I'm trying to get a value from an HTML page that has the name
I'm trying to get an html page to display an XML file formatted with
I`m trying to send simple html page with form data to user with GET,
i'm trying to parse an html page and get the first occurrence of a
I am trying get all html links within a string and replace them using
I am trying get all html links within a string and replace them using
I'm trying to get a HTML source of a website through C# code. When
I am trying to get two jQuery slides to work in a HTML page.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.