Hi,
I'm trying to translate an asp application in a php way, i'm using Php
4.3.x.
I'm going to try an asp newsgroup too, but as it mainly deals with Php, I
would like to submit you my probem :
I have to retrieve some XML datas from a server whose URL is built like that
:
I tried fopen, fsockopen with no result.
So it's https, there is a port (4012 for example). Perhaps I forgot some
particular https parameters with my fopen and fsockopen tries ?
The original asp code is :
---
Set myxml = Server.CreateOb ject("Msxml2.Se rverXMLHTTP.4.0 ")
' Opens the connection to the remote server :
xml.Open "GET", url, False
---
Php methods didn't work so I tried the ajax way :
if(window.XMLHt tpRequest){
// Firefox, Safari, Opera...
req = new XMLHttpRequest( );
} else if(window.Activ eXObject) {
// Internet Explorer 5+
req = new ActiveXObject(" Microsoft.XMLHT TP");
} else {
alert('Problem creating the XMLHttpRequest object');
return false;
}
return req;
.... But i'm not sure the ActiveXObject is identical to the original :
Set myxml = Server.CreateOb ject("Msxml2.Se rverXMLHTTP.4.0 ")
So if you have any ideas to do it with Php or any other technical ways, you
are welcome.
Thanks,
Arnaud
I'm trying to translate an asp application in a php way, i'm using Php
4.3.x.
I'm going to try an asp newsgroup too, but as it mainly deals with Php, I
would like to submit you my probem :
I have to retrieve some XML datas from a server whose URL is built like that
:
I tried fopen, fsockopen with no result.
So it's https, there is a port (4012 for example). Perhaps I forgot some
particular https parameters with my fopen and fsockopen tries ?
The original asp code is :
---
Set myxml = Server.CreateOb ject("Msxml2.Se rverXMLHTTP.4.0 ")
' Opens the connection to the remote server :
xml.Open "GET", url, False
---
Php methods didn't work so I tried the ajax way :
if(window.XMLHt tpRequest){
// Firefox, Safari, Opera...
req = new XMLHttpRequest( );
} else if(window.Activ eXObject) {
// Internet Explorer 5+
req = new ActiveXObject(" Microsoft.XMLHT TP");
} else {
alert('Problem creating the XMLHttpRequest object');
return false;
}
return req;
.... But i'm not sure the ActiveXObject is identical to the original :
Set myxml = Server.CreateOb ject("Msxml2.Se rverXMLHTTP.4.0 ")
So if you have any ideas to do it with Php or any other technical ways, you
are welcome.
Thanks,
Arnaud
Comment