Stretchwickster
Programmer
Hi there,
I'm completely new to classic ASP, but have a fair bit of server-side experience with PHP.
I've cobbled together the following simple ASP script (called xml_echo.asp) which echoes the XML output from a PHP script (due to constraints imposed on me, I'm not permitted by my employer to directly access one of our remote databases from the ASP environment - hence this workaround):
Since the XML output from the PHP script doesn't change often, I would ideally like to cache the output of this ASP script, so that the PHP script is only called once per day. Does anyone have any suggestions as to the best way to achieve this?
Your advice would be much appreciated.
Clive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
I'm completely new to classic ASP, but have a fair bit of server-side experience with PHP.
I've cobbled together the following simple ASP script (called xml_echo.asp) which echoes the XML output from a PHP script (due to constraints imposed on me, I'm not permitted by my employer to directly access one of our remote databases from the ASP environment - hence this workaround):
Code:
<%
Dim objParser
Set objParser = Server.CreateObject("Msxml2.DomDocument")
objParser.async = false
objParser.setProperty "ServerHTTPRequest", true
objParser.load("[URL unfurl="true"]http://www.mydomain.com/data.php")[/URL]
if objParser.parseError.errorCode <> 0 then
Response.Write(objParser.parseError.reason)
else
Response.ContentType = "text/xml"
Response.Write objParser.xml
end if
Set objParser = nothing
%>
Your advice would be much appreciated.
Clive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096