Hello! Such a problem: There is a script on VBS, which is launched from the WinCCRuntime application (such software from Siemens). The script creates an MSXML2.XMLHTTP object and sends the data to a handler written in PHP, which runs under OpenServer 5.3.0.Premium on the same host (all this on a virtual machine). After executing the script, readystate "4" is returned to the application and the responsetext with the corresponding data (PHP simply prints what was sent to it). But on the page in the browser, these data are not displayed !!! (Echo doesn't print anything at all, print_r displays an empty Array). The problem is the same when using GET and POST. I need to display the data in a web application. What could be the problem? I watched the question. The browser does not display the data sent by the POST method, but there was another web server. I just have an openserver. Thank you in advance. This is the VBS code:
Sub OnLButtonDown(ByVal Item, ByVal Flags, ByVal x, ByVal y) Dim data2 data2=HMIRuntime.Tags("Plant1/RMT1/LI111/CFC_LI111/LIA.#comment").Read Dim xmlhttp Set xmlhttp = CreateObject("MSXML2.XMLHTTP") data1="hello" xmlhttp.open "GET", "http://localhost:90/ajax1/handler.php?value="&data1, True xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xmlhttp.setRequestHeader "Access-Control-Allow-Origin", " *" xmlhttp.send "" Dim obj4 Set obj4 = HMIRuntime.Screens("http").ScreenItems("Button2") obj4.Text=xmlhttp.readyState Dim obj3 Set obj3 = HMIRuntime.Screens("http").ScreenItems("Button3") obj3.Text=xmlhttp.responseText End Sub
This is the PHP code:
<?php $value=$_GET['value']; echo $value."<br/>"; ?>