CreateObject( "MSXML2.XMLHTTP" )
- karinha
- Posts: 7952
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 4 times
- Contact:
Re: CreateObject( "MSXML2.XMLHTTP" )
Format and install windows 7 32 bit that will work. Mine is windows 7 32 bit professional.
If it is not difficult, it is not Silvio Falconi. hahahahahahaha.
Just playing with you.
Regards, saludos.
If it is not difficult, it is not Silvio Falconi. hahahahahahaha.
Just playing with you.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 5 times
Re: CreateObject( "MSXML2.XMLHTTP" )
there is something wrong because using hbcurl lib I can see what is on that url, so there is a bug on createobject...on win 7
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Giovany Vecchi
- Posts: 223
- Joined: Mon Jun 05, 2006 9:39 pm
- Location: Brasil
Re: CreateObject( "MSXML2.XMLHTTP" )
In several cases when sending content the correct POST would be
Try like this:
ohttp:Open( "POST" ,"http://www.w3schools.com/angular/customers.php", .F. )
Try like this:
ohttp:Open( "POST" ,"http://www.w3schools.com/angular/customers.php", .F. )
- karinha
- Posts: 7952
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 4 times
- Contact:
Re: CreateObject( "MSXML2.XMLHTTP" )
Giovany Vecchi wrote:In several cases when sending content the correct POST would be
Try like this:
ohttp:Open( "POST" ,"http://www.w3schools.com/angular/customers.php", .F. )
Code: Select all | Expand
#include "FiveWin.ch"
#Define cUrl "http://www.w3schools.com/angular/customers.php"
FUNCTION Main()
LOCAL cHtml, oServer, cStringCookie
#ifdef __XHARBOUR__ // xHarbour
Try
oServer := CreateObject( "MSXML2.ServerXMLHTTP.6.0" )
Catch
MsgInfo( 'Erro na Criação do Serviço' )
RETURN NIL
End
#else
Try
oServer := win_OleCreateObject( "MSXML2.ServerXMLHTTP.5.0" )
Catch
MsgInfo( 'Erro na Criação do Serviço!', 'Atenção!' )
RETURN NIL
End
#endif
Try
oServer:Open( "POST", cUrl, .F. )
Catch
MsgInfo( 'Erro na Conexão com o Site ' + cUrl )
RETURN .F.
End
oServer:SetRequestHeader( "Content-Type", "application/x-www-form-urlencoded" )
oServer:SetRequestHeader( "Connection", "keep-alive" )
Try
oServer:Send()
oServer:WaitForResponse( 500000 )
Catch
MsgInfo( 'Erro na Resposta com o Site ' + cUrl )
RETURN( .F. )
End
cHtml := oServer:ResponseBody
cStringCookie := oServer:getResponseHeader("Set-Cookie")
MemoWrit( 'SiteA.txt', cHtml )
xBrowse( "SiteA.txt" )
RETURN NIL
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- Otto
- Posts: 6414
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 31 times
- Been thanked: 2 times
- Contact:
Re: CreateObject( "MSXML2.XMLHTTP" )
Thank you, João. Your code is working fine here.
Best regards,
Otto
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 5 times
Re: CreateObject( "MSXML2.XMLHTTP" )
I Installed on this computer ( Windows Seven Home) Server Pack 1 and also not run, same error
I wish ask You a question....
Why if I use hbcurl functions it run ?
I wish ask You a question....
Why if I use hbcurl functions it run ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 5 times
Re: CreateObject( "MSXML2.XMLHTTP" )
Otto wrote:Thank you, João. Your code is working fine here.
Best regards,
Otto
do you are trying it on Windows Seven Home 64 bit ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Otto
- Posts: 6414
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 31 times
- Been thanked: 2 times
- Contact:
Re: CreateObject( "MSXML2.XMLHTTP" )
Silvio,
No, I tested with WINDOWS 10. But the initial sample didn't work. Now all works fine.
https://support.microsoft.com/en-us/windows/windows-7-support-ended-on-january-14-2020-b75d4580-2cc7-895a-2c9c-1466d9a53962
Best regards,
Otto
No, I tested with WINDOWS 10. But the initial sample didn't work. Now all works fine.
https://support.microsoft.com/en-us/windows/windows-7-support-ended-on-january-14-2020-b75d4580-2cc7-895a-2c9c-1466d9a53962
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 5 times
Re: CreateObject( "MSXML2.XMLHTTP" )
Otto wrote:Silvio,
No, I tested with WINDOWS 10. But the initial sample didn't work. Now all works fine.
https://support.microsoft.com/en-us/windows/windows-7-support-ended-on-january-14-2020-b75d4580-2cc7-895a-2c9c-1466d9a53962
Best regards,
Otto
As I have already explained to Antonio Linares, I have to use this computer with Windows Seven Home Sp1, I cannot upgrade it to Windows 10 because this computer is in the presidency, this computer is used by the Headmaster of my school, and in this computer he also has others software not working under windows 10,
so I have to find other solutions.
But the problem remains, probably the Create Object command has a bug because in windows Seven Home premium it makes this error
Code: Select all | Expand
Error description: (DOS Error -2147352567) WINOLE/1007 Download della risorsa specificata non riuscito.
(0x800C0008): msxml3.dll
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- karinha
- Posts: 7952
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 4 times
- Contact:
Re: CreateObject( "MSXML2.XMLHTTP" )
Compile con: -w3 -es2
Mira tu Windows 7 64 bits, se está asi:
https://certified.windowserrorhelp.com/automatically-repair-windows-errors/?error=DLL%20File%20Errors&gclid=CjwKCAiA6aSABhApEiwA6Cbm____18ORQFVSOXeRzMLga4u68HeEhTPhJG56wA8y5LGUk5s9WNgpRBoCv8AQAvD_BwE
Regards.
Mira tu Windows 7 64 bits, se está asi:
Code: Select all | Expand
c:\Windows\System32\msxml3.dll
c:\Windows\System32\msxml3r.dll
c:\Windows\System32\msxml6.dll
c:\Windows\System32\msxml6r.dll
c:\Windows\SysWOW64\msxml3.dll
c:\Windows\SysWOW64\msxml3r.dll
c:\Windows\SysWOW64\msxml6.dll
c:\Windows\SysWOW64\msxml6r.dll
https://certified.windowserrorhelp.com/automatically-repair-windows-errors/?error=DLL%20File%20Errors&gclid=CjwKCAiA6aSABhApEiwA6Cbm____18ORQFVSOXeRzMLga4u68HeEhTPhJG56wA8y5LGUk5s9WNgpRBoCv8AQAvD_BwE
Regards.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- Otto
- Posts: 6414
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 31 times
- Been thanked: 2 times
- Contact:
Re: CreateObject( "MSXML2.XMLHTTP" )
Hello Silvio,
Can you use a web server on the WINDOWS 7 PC_
You could then call the localhost silently and save the response XML 'file and then read it with memoread.
If you can install mod harbour, you can create the DBF file immediately.
Best regards,
Otto
http://localhost/silvio/index.html
Can you use a web server on the WINDOWS 7 PC_
You could then call the localhost silently and save the response XML 'file and then read it with memoread.
If you can install mod harbour, you can create the DBF file immediately.
Best regards,
Otto
http://localhost/silvio/index.html
Code: Select all | Expand
<!DOCTYPE html>
<html lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<script>
const http = new XMLHttpRequest()
const url = "https://www.w3schools.com/angular/customers.php";
http.open('get', url, true);
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
http.onload = function () {
if(http.status === 200 || http.status == 0) {
alert("succeed")
console.log(http.responseText);
alert( http.responseText )
}
}
http.onerror = function () {
alert("failed")
};
http.send();
</script>
</body>
</html>
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 5 times
Re: CreateObject( "MSXML2.XMLHTTP" )
karinha wrote:Compile con: -w3 -es2
Mira tu Windows 7 64 bits, se está asi:Code: Select all | Expand
c:\Windows\System32\msxml3.dll
c:\Windows\System32\msxml3r.dll
c:\Windows\System32\msxml6.dll
c:\Windows\System32\msxml6r.dll
c:\Windows\SysWOW64\msxml3.dll
c:\Windows\SysWOW64\msxml3r.dll
c:\Windows\SysWOW64\msxml6.dll
c:\Windows\SysWOW64\msxml6r.dll
with payment I not have money
https://certified.windowserrorhelp.com/automatically-repair-windows-errors/?error=DLL%20File%20Errors&gclid=CjwKCAiA6aSABhApEiwA6Cbm____18ORQFVSOXeRzMLga4u68HeEhTPhJG56wA8y5LGUk5s9WNgpRBoCv8AQAvD_BwE
Regards.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Giovany Vecchi
- Posts: 223
- Joined: Mon Jun 05, 2006 9:39 pm
- Location: Brasil
Re: CreateObject( "MSXML2.XMLHTTP" )
In some versions of windows as an example: SEVEN SP1 and XP I solved the problem including SETTIMEOUTS.
Code: Select all | Expand
oServer := CreateObject( "MSXML2.ServerXMLHTTP.6.0" )
oServer:SetTimeouts(40000,40000,40000,40000)
- karinha
- Posts: 7952
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 4 times
- Contact:
Re: CreateObject( "MSXML2.XMLHTTP" )
Silvio:
Silvio, you don't fool me. I know you are very rich. hahahahahahaha.
Regards.
with payment I not have money
Silvio, you don't fool me. I know you are very rich. hahahahahahaha.
Regards.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- karinha
- Posts: 7952
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 4 times
- Contact:
Re: CreateObject( "MSXML2.XMLHTTP" )
Code: Select all | Expand
// \SAMPLES\NAGES2.PRG
#include "FiveWin.ch"
#define cUrl "http://www.w3schools.com/angular/customers.php"
FUNCTION Main()
LOCAL cHtml, oServer, cStringCookie
#ifdef __XHARBOUR__ // xHarbour
Try
oServer := CreateObject( "MSXML2.ServerXMLHTTP.6.0" )
oServer:SetTimeouts(40000,40000,40000,40000)
Catch
MsgInfo( 'Erro na Criação do Serviço' )
RETURN NIL
End
#else
Try
oServer := win_OleCreateObject( "MSXML2.ServerXMLHTTP.5.0" )
oServer:SetTimeouts(40000,40000,40000,40000)
Catch
MsgInfo( 'Erro na Criação do Serviço!', 'Atenção!' )
RETURN NIL
End
#endif
Try
oServer:Open( "POST", cUrl, .F. )
Catch
MsgInfo( 'Erro na Conexão com o Site ' + cUrl )
RETURN .F.
End
oServer:SetRequestHeader( "Content-Type", "application/x-www-form-urlencoded" )
oServer:SetRequestHeader( "Connection", "keep-alive" )
Try
oServer:Send()
oServer:WaitForResponse( 500000 )
Catch
MsgInfo( 'Erro na Resposta com o Site ' + cUrl )
RETURN( .F. )
End
cHtml := oServer:ResponseBody
cStringCookie := oServer:getResponseHeader("Set-Cookie")
MemoWrit( 'SiteA.txt', cHtml )
xBrowse( "SiteA.txt" )
RETURN NIL
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341