distant file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matrix

    distant file

    hi,

    On my compagny, I have a ASP web server. In ASP, I'd like to open the
    generated HTML) of the pages on my server. If I either try :
    Set file = fs.OpenTextFile (http://server/site/index.asp, ForReading)
    or
    Set file = fs.GetFile(http://server/site/index.asp)

    Well, it's not working.
    Does anyone know how to do ? or another method to get the generated HTML of
    my web site?

    Thks
    Matrix


  • Evertjan.

    #2
    Re: distant file

    Matrix wrote on 10 jul 2003 in microsoft.publi c.inetserver.as p.general:[color=blue]
    > On my compagny, I have a ASP web server. In ASP, I'd like to open the
    > generated HTML) of the pages on my server. If I either try :
    > Set file = fs.OpenTextFile (http://server/site/index.asp, ForReading)
    > or
    > Set file = fs.GetFile(http://server/site/index.asp)
    >
    > Well, it's not working.
    > Does anyone know how to do ? or another method to get the generated
    > HTML of my web site?[/color]

    clientside javascript:

    <script>
    function getUrl(url) {
    var http = new ActiveXObject(" microsoft.xmlht tp");
    http.open("GET" ,url,false);
    http.send();
    return http.responseTe xt;
    }
    html=getUrl("ht tp://server/site/index.asp")
    </script>

    Perhaps you can do this serverside too ????

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • Matrix

      #3
      Re: distant file

      > clientside javascript:[color=blue]
      >
      > <script>
      > function getUrl(url) {
      > var http = new ActiveXObject(" microsoft.xmlht tp");
      > http.open("GET" ,url,false);
      > http.send();
      > return http.responseTe xt;
      > }
      > html=getUrl("ht tp://server/site/index.asp")
      > </script>
      >
      > Perhaps you can do this serverside too ????[/color]

      indeed. Based on your code, I found something that works:

      Set file = Server.CreateOb ject("Microsoft .XMLHTTP")
      file.Open "GET", "http://server/site/index.asp", False
      file.Send
      response.Write file.responseTe xt

      Have fun,
      Matrix


      Comment

      • Matrix

        #4
        Re: distant file

        But now, I have a strange problem. I'm french, and so, I use french letter
        such as é, è, à
        When I run the code, every time I have a "french" letter, the system replace
        it and the 2 following letters by 1 question mark '?'
        Does anyone have an idea of what's happening, and how I could resolve it ?

        Thks,
        Matrix


        Comment

        Working...