Forum Moderators: coopster

Message Too Old, No Replies

Parse Error for Microsoft.XMLHTTP

$xml->Open "GET" ...... does not work

         

aries

6:41 am on Dec 21, 2004 (gmt 0)

10+ Year Member



I want the following ASP code to be rewritten in PHP:

<%

Set xml = Server.CreateObject("Microsoft.XMLHTTP")

xml.Open "GET", "http://www.mydomain.com", False
xml.Send

Response.Write(xml.responseText)

%>

I tried myself with ASP2PHP conversion tool. The following code was generated. But does not work. I get a parse error. Please help!

<?PHP

$xml->Open "GET" "http://www.mydomain.com" $False;
$xml->Send;

echo $xml->responseText;

?>

Eagerly waiting for your reply!

Regards,
aries

jatar_k

4:31 am on Dec 22, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



what's the exact error?

aries

5:22 am on Dec 22, 2004 (gmt 0)

10+ Year Member



The exact error is as follows

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING test.php on line 2

Can you please help me? :)

Regards,
aries

jatar_k

5:27 am on Dec 22, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have you looked through the PHP XML Parser Functions [php.net] for some examples?