Web content access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?SSBhbSBTYW0=?=

    #1

    Web content access

    Hello everyone,

    It has been a while and I need some help. I need to access specific
    information on a third party web site and return that specific information on
    a web site I am working on. Is there a library or namespace I can use that
    will provide support for such a feature or do I have to use client-side
    scripting, namely the navigate function in javascript. Any help in this
    matter will be much appreciated.

    Thank you in advance,

    Sam I am-
  • =?Utf-8?B?SSBhbSBTYW0=?=

    #2
    RE: Web content access

    My problem though, is how do I access the remote page? I thought of using
    javascripts' Navigate or location Method or property but all that does is
    redirect to the provided url. I need to grab the information on the remote
    page, stuff it into a string and parse it while remaining at the local or
    rather current page without being redirected. Do you know of a Library in
    ..NET or of the proper javascript method to use inorder to accomplish my
    requirements?

    "Milosz Skalecki [MCAD]" wrote:
    Hi Sam,
    >
    In this case i'd also recommend regular expressions.
    >
    Regards
    --
    Milosz
    >
    >
    "I am Sam" wrote:
    >
    I'll have to parse the HTML from the pages. Most likely though stuff the
    encoded information into a StringBuilder or a string.

    "Milosz Skalecki [MCAD]" wrote:
    Howdy,
    >
    Could you give us more details regarding the way data is exposed by this
    third party website? do you have to parse HTML from the pages, or get XML
    document?
    --
    Milosz
    >
    >
    "I am Sam" wrote:
    >
    Hello everyone,

    It has been a while and I need some help. I need to access specific
    information on a third party web site and return that specific information on
    a web site I am working on. Is there a library or namespace I can use that
    will provide support for such a feature or do I have to use client-side
    scripting, namely the navigate function in javascript. Any help in this
    matter will be much appreciated.

    Thank you in advance,

    Sam I am-

    Comment

    • =?Utf-8?B?SSBhbSBTYW0=?=

      #3
      RE: Web content access

      I'll have to parse the HTML from the pages. Most likely though stuff the
      encoded information into a StringBuilder or a string.

      "Milosz Skalecki [MCAD]" wrote:
      Howdy,
      >
      Could you give us more details regarding the way data is exposed by this
      third party website? do you have to parse HTML from the pages, or get XML
      document?
      --
      Milosz
      >
      >
      "I am Sam" wrote:
      >
      Hello everyone,

      It has been a while and I need some help. I need to access specific
      information on a third party web site and return that specific information on
      a web site I am working on. Is there a library or namespace I can use that
      will provide support for such a feature or do I have to use client-side
      scripting, namely the navigate function in javascript. Any help in this
      matter will be much appreciated.

      Thank you in advance,

      Sam I am-

      Comment

      • =?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=

        #4
        RE: Web content access

        Howdy,

        Could you give us more details regarding the way data is exposed by this
        third party website? do you have to parse HTML from the pages, or get XML
        document?
        --
        Milosz


        "I am Sam" wrote:
        Hello everyone,
        >
        It has been a while and I need some help. I need to access specific
        information on a third party web site and return that specific information on
        a web site I am working on. Is there a library or namespace I can use that
        will provide support for such a feature or do I have to use client-side
        scripting, namely the navigate function in javascript. Any help in this
        matter will be much appreciated.
        >
        Thank you in advance,
        >
        Sam I am-

        Comment

        • =?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=

          #5
          RE: Web content access

          Howdy,

          Sorry for my late reply. It's quite simple:

          System.Net.WebR equest request =
          System.Net.WebR equest.Create(" http://www.microsoft.c om/en/us/default.aspx");

          request.Method = "GET";
          System.Net.WebR esponse response = request.GetResp onse();
          System.IO.Strea m stream = response.GetRes ponseStream();

          System.IO.Strea mReader reader =
          new System.IO.Strea mReader(stream) ;
          System.Text.Str ingBuilder html =
          new System.Text.Str ingBuilder(read er.ReadToEnd()) ;

          // do something with the html returned for the page
          --
          Milosz


          "I am Sam" wrote:
          My problem though, is how do I access the remote page? I thought of using
          javascripts' Navigate or location Method or property but all that does is
          redirect to the provided url. I need to grab the information on the remote
          page, stuff it into a string and parse it while remaining at the local or
          rather current page without being redirected. Do you know of a Library in
          .NET or of the proper javascript method to use inorder to accomplish my
          requirements?
          >
          "Milosz Skalecki [MCAD]" wrote:
          >
          Hi Sam,

          In this case i'd also recommend regular expressions.

          Regards
          --
          Milosz


          "I am Sam" wrote:
          I'll have to parse the HTML from the pages. Most likely though stuff the
          encoded information into a StringBuilder or a string.
          >
          "Milosz Skalecki [MCAD]" wrote:
          >
          Howdy,

          Could you give us more details regarding the way data is exposed by this
          third party website? do you have to parse HTML from the pages, or get XML
          document?
          --
          Milosz


          "I am Sam" wrote:

          Hello everyone,
          >
          It has been a while and I need some help. I need to access specific
          information on a third party web site and return that specific information on
          a web site I am working on. Is there a library or namespace I can use that
          will provide support for such a feature or do I have to use client-side
          scripting, namely the navigate function in javascript. Any help in this
          matter will be much appreciated.
          >
          Thank you in advance,
          >
          Sam I am-

          Comment

          • =?Utf-8?B?SSBhbSBTYW0=?=

            #6
            RE: Web content access

            Thank you for your reply nevertheless. I figured it out but I used
            HttpWebRequest with streamreader and used the post method as opposed to the
            get method.

            Everything is working fine except now I am stuck with the monotonous task of
            parsing the HTML to get the elements I need. It is specially difficult
            because the elements I need do not have ID's so I have to use Regex and do
            some pattern matching.
            :-S boring stuff. I hate Regular Expressions.

            I am Sam-

            "Milosz Skalecki [MCAD]" wrote:
            Howdy,
            >
            Sorry for my late reply. It's quite simple:
            >
            System.Net.WebR equest request =
            System.Net.WebR equest.Create(" http://www.microsoft.c om/en/us/default.aspx");
            >
            request.Method = "GET";
            System.Net.WebR esponse response = request.GetResp onse();
            System.IO.Strea m stream = response.GetRes ponseStream();
            >
            System.IO.Strea mReader reader =
            new System.IO.Strea mReader(stream) ;
            System.Text.Str ingBuilder html =
            new System.Text.Str ingBuilder(read er.ReadToEnd()) ;
            >
            // do something with the html returned for the page
            --
            Milosz
            >
            >
            "I am Sam" wrote:
            >
            My problem though, is how do I access the remote page? I thought of using
            javascripts' Navigate or location Method or property but all that does is
            redirect to the provided url. I need to grab the information on the remote
            page, stuff it into a string and parse it while remaining at the local or
            rather current page without being redirected. Do you know of a Library in
            .NET or of the proper javascript method to use inorder to accomplish my
            requirements?

            "Milosz Skalecki [MCAD]" wrote:
            Hi Sam,
            >
            In this case i'd also recommend regular expressions.
            >
            Regards
            --
            Milosz
            >
            >
            "I am Sam" wrote:
            >
            I'll have to parse the HTML from the pages. Most likely though stuff the
            encoded information into a StringBuilder or a string.

            "Milosz Skalecki [MCAD]" wrote:

            Howdy,
            >
            Could you give us more details regarding the way data is exposed by this
            third party website? do you have to parse HTML from the pages, or get XML
            document?
            --
            Milosz
            >
            >
            "I am Sam" wrote:
            >
            Hello everyone,

            It has been a while and I need some help. I need to access specific
            information on a third party web site and return that specific information on
            a web site I am working on. Is there a library or namespace I can use that
            will provide support for such a feature or do I have to use client-side
            scripting, namely the navigate function in javascript. Any help in this
            matter will be much appreciated.

            Thank you in advance,

            Sam I am-

            Comment

            Working...