Solved

read URL output(CSV) file into ASP

Posted on 2011-02-28
3
512 Views
Last Modified: 2012-05-11
Hi,

i have a http url which returns .csv file upon execution.

is there any way i can execute the URL from ASP and cath the response (which is .csv file) into a string variable?

Example: My csv returns this data...:
              Date,Open,High,Low
              2011-02-25,16.39,16.77,1

Environment: ASP (Active Server Pages)

thanks
0
Comment
Question by:kishan66
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
rhawk earned 500 total points
ID: 35001145
Dim targetURL, strResponse
targetURL = "http://where.you.want.com"

set httpRequest = CreateObject("WinHttp.WinHttprequest.5.1")
httpRequest.Open "POST", targetURL, false
httpRequest.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
httpRequest.send
strResponse = httpRequest.responseText
0
 

Author Comment

by:kishan66
ID: 35001494
Thats what i am talking about, rhawk.

Thank you so much.

can you pls suggest me site(s)  where i can read about this kind of "httpRequest/Response" header for ASP , in general.
0
 
LVL 2

Expert Comment

by:rhawk
ID: 35001813
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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/…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now