View Full Version : Translater ASP code to PHP

06-10-2007, 12:13 AM
Hi, I have an exemple of a script here in ASP that
receives an XML document and puts it into array :

I would really need some help to translate this into PHP script !
Thank You very much

'Get XML that was send from SWF file
Dim sXMLString

dim item as String
For Each item In Request.Form
'Response.Write(item & " = " & Request.Form(item) & VbCrLf)
sXMLString = sXMLString & item & " = " & Request.Form(item)

'Load XML into object
Dim oXML as Object
Dim oNodeList as Object
Dim oNode as Object

oXML = Server.CreateObject("MSXML2.DOMDocument")
oXML.async = False
oXML.validateOnParse = False


'Use XPath to get the data
dim sPath as String
sPath = "/data/variable/row/column"
oNodeList = oXML.documentElement.selectNodes(sPath)

'Store data in an array
dim i, aVals(3)
For Each oNode in oNodeList
With oNode
' Just write the xml for that node to show you.
'Response.Write(.text + "<br>")
End With

mr e
06-10-2007, 12:38 AM
Have you tried anything yourself?

I'm all for helping, but I'm not going to do the entire thing for you.

06-11-2007, 12:22 AM
my biggest problem is the following, here's what I did :

foreach ($_REQUEST as $field => $value){
$AFIELD[$i] = $field;
$AVALUE[$i] = $value;
$valt = $valt.$i;
$val = $val.$value;

The thing is :
I have a Flash file (SWF) that sends some data (in XML format) trough
HTTP POST method to a given URL. (let say www.test.com/addresult.php)

I would need my PHP script to capture the data which is suppose to look
like this :

<variable name="Vote">

I know how to script to send back data to the file... but I dont know
how to capture de data sent by the SWF file...
They give an exemple with ASP (as show above) .
Been working around for +20 hours now. still cant get it to work :(

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum