Solved

Use URL to open a remote textfile using OpenTextFile function?

Posted on 2003-11-12
3
927 Views
Last Modified: 2010-05-18
Im trying to open a textfile on a remote location...
This is what I've come up with... But it doesnt work...

Set fso=Server.CreateObject("Scripting.FileSystemObject")
Set otf=fso.OpenTextFile("http://mywebsite/folder/index.html",1,false)

Are there any other alternatives that anyone can think of?

Thanks for your time...
0
Comment
Question by:c0rrupti0n
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 9736636
FSO is for local files only
<%
Set objXMLHTTP = server.CreateObject("Microsoft.XMLHTTP")
 
objXMLHTTP.Open "post", "http://www.intouchmedialtd.com/file.txt", False
objXMLHTTP.Send

PageContent = objXMLHTTP.responseText
response.write pagecontent
%>
0
 
LVL 1

Author Comment

by:c0rrupti0n
ID: 9738653
Well I tried your example (GaryC123) and no go... I keep getting an error HTTP/1.0 501 Not Implemented in my browser. I did some research and found similar examples http://www.w3schools.com/dom/dom_http.asp. However those didnt seem to work either. I then came across this...

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q237/9/06.ASP&NoWebContent=1

I believe this might be why its not working... and even if it did Im still uncertain it would work out because I need to use the OpenTextFile function in FSO.

Im trying to grap a text file from a remote web server. Parse it to find certain text in the files.

I need the use of the follow Sub functions of OpenTextFile:

Read
Skipline
Skip

Thanks for the swift response...
0
 
LVL 58

Accepted Solution

by:
Gary earned 20 total points
ID: 9738758
If you're having problems with it then use the GET method

<%
Set objXMLHTTP = server.CreateObject("Microsoft.XMLHTTP")
 
objXMLHTTP.Open "get", "http://www.intouchmedialtd.com/product.txt", false
objXMLHTTP.Send

PageContent = objXMLHTTP.responseText
response.write pagecontent
%>

Apart from that there's nothing you can do
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Using querystring in a hyperlink 3 60
Html CheckBox obtain Its Value 5 36
Validating Date Part2 2 26
VB script help 23 30
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question