Saving a file on a server using ASP

They have: 4 posts

Joined: Apr 2000

I'm creating a script that collects data from an xml file and saves them as a csv/text file.

The script looks like this:

<?php
Response
.ContentType = "application/save"

Response.AddHeader "Content-Disposition", "filename=otcdata.csv;"

'Load the XML
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false
xml.load(Server.MapPath("otc.xml"))

'
Load the XSL
set xsl
= Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl
.load(Server.MapPath("csv.xsl"))

'Transform the file
Response.Write(xml.transformNode(xsl))

  Response.End
?>

The problem is that this script prompts the user to save/open the file in the browser. Is it possible to get the script to save the csv-file on the server, and how?

Any help would be extremely appreciated.

Free Wallpapers for your Desktop at http://www.desktopwallpapers.net/