distant file

M

Matrix

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
 
E

Evertjan.

Matrix wrote on 10 jul 2003 in microsoft.public.inetserver.asp.general:
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?

clientside javascript:

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

Perhaps you can do this serverside too ????
 
M

Matrix

clientside javascript:
<script>
function getUrl(url) {
var http = new ActiveXObject("microsoft.xmlhttp");
http.open("GET",url,false);
http.send();
return http.responseText;
}
html=getUrl("http://server/site/index.asp")
</script>

Perhaps you can do this serverside too ????

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

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

Have fun,
Matrix
 
M

Matrix

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top