Jump to content

Coverting to PHP


StirCrazy

Recommended Posts

This is probably the wrong place to post this but I'm hoping someone who knows PHP here also knows ASP/IIS


Is there a way of doing this:-
[code]Dim xmlrequest
Set xmlrequest = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlrequest.open "GET", strQuery, False
xmlrequest.setRequestHeader "Content-type", "text/xml"
xmlrequest.send

xml.loadxml(xmlrequest.responseText)
xsl.load(Server.MapPath(".") & "\results.xsl")[/code]


...in PHP?


Regards,
S.C>
Link to comment
https://forums.phpfreaks.com/topic/29707-coverting-to-php/
Share on other sites

u loading XML? and then converting it via XSL to another XML doc?


$xml = new DOMDocument;
$xml->load('collection.xml');

$xsl = new DOMDocument;
$xsl->load('collection.xsl');

// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules

//this might be needed... header("Content-Type: text/xml");
echo $proc->transformToXML($xml);
Link to comment
https://forums.phpfreaks.com/topic/29707-coverting-to-php/#findComment-136368
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.