Solved

How can I make an HTTP request from WITHIN an ASP script

Posted on 2004-09-24
7
264 Views
Last Modified: 2006-11-17
This may seem an odd thing to want to do, but it is possible to make an HTTP POST or GET to another web server from within an ASP script, then recieve & parse the result within ASP?

The actual requirement is to upload two files to a remote server via HTTP, then to download and parse (within the script) the file that is returned.  The contents of this file will be used within the script to produce the final output to the client.

Does anyone know of any way this can be achieved?  Ideally, with a code sample.

Thanks in advance
0
Comment
Question by:DrBeaker
[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
  • 4
  • 3
7 Comments
 
LVL 8

Expert Comment

by:a_twixt_in_the_tale
ID: 12141293
user Server.CreateObject("Microsoft.XMLHTTP")
0
 
LVL 2

Author Comment

by:DrBeaker
ID: 12141329
Could you elaborate and ideally provide a code sample
0
 
LVL 8

Expert Comment

by:a_twixt_in_the_tale
ID: 12141369
<%
      Set xml = Server.CreateObject("Microsoft.XMLHTTP")
      xml.Open "GET", "http://www.google.com/", False
      xml.Send
      response.write(xml.responseText)
%>
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:DrBeaker
ID: 12141550
:) OK

Actually I have been searching google & MS re this since your first (very helpful) post with mixed results.  Where is this component documented?  I've been able to find references to the docs but no actual docs.

How would I upload & download files?

Sorry to me so demanding, but ASP is very new to me.

0
 
LVL 8

Accepted Solution

by:
a_twixt_in_the_tale earned 250 total points
ID: 12142757
> Where is this component documented?
Dunno exactly. its part of Microsoft's XML parser. should b there in C:\Program Files\MSXML 4.0\doc\xmlsdk.chm sumwhere or msxml 3.0 if u use that

try http://www.4guysfromrolla.com/webtech/110100-1.shtml should b good

> How would I upload & download files?
Getting Binary Data is there in http://www.4guysfromrolla.com/webtech/110100-1.shtml
Uploading files u hv loadsa cmpts, i hvnt used any though, so any of my suggestions on that would be all hot air. :)

:)
Don
0
 
LVL 2

Author Comment

by:DrBeaker
ID: 12142931
Thanks for the help.  I've doubled the points for a very prompt, helpful and interactive response.

Cheers Don.

Dave
0
 
LVL 8

Expert Comment

by:a_twixt_in_the_tale
ID: 12143275
Thnx!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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
File download script VBSCRIPT fail on download PPT files 2 71
JS does not refresh 6 40
Html Table Looping (part 2) 5 35
calculate days away 11 31
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/…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 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