Is it possible to get variable from php page to use it in my windows form?
是否可以从php页面获取变量以在我的Windows窗体中使用它?
2 个解决方案
#1
3
Instead of emitting HTML with your .PHP file, emit a single value.
而不是使用.PHP文件发出HTML,而是发出单个值。
<?php
echo $MyVar;
?>
Then, with your application, fire off an HTTPRequest to the PHP page. Then, convert the string in the HTTP Response to the data type of the variable.
然后,使用您的应用程序,启动HTTPRequest到PHP页面。然后,将HTTP响应中的字符串转换为变量的数据类型。
#2
0
Instead of a variable you can write an xml as an page output and that can be used on windows form using HttpWebRequest and HttpWebResponse classes.
您可以将xml编写为页面输出,而不是变量,可以使用HttpWebRequest和HttpWebResponse类在Windows窗体上使用。
#1
3
Instead of emitting HTML with your .PHP file, emit a single value.
而不是使用.PHP文件发出HTML,而是发出单个值。
<?php
echo $MyVar;
?>
Then, with your application, fire off an HTTPRequest to the PHP page. Then, convert the string in the HTTP Response to the data type of the variable.
然后,使用您的应用程序,启动HTTPRequest到PHP页面。然后,将HTTP响应中的字符串转换为变量的数据类型。
#2
0
Instead of a variable you can write an xml as an page output and that can be used on windows form using HttpWebRequest and HttpWebResponse classes.
您可以将xml编写为页面输出,而不是变量,可以使用HttpWebRequest和HttpWebResponse类在Windows窗体上使用。