简体   繁体   English

PHP,Java Applet通信

[英]PHP, Java Applet communication

Here's what I would like to do. 这就是我想做的。

I have a PHP file in my server where I would like to call java applet. 我的服务器中有一个PHP文件,我想在其中调用Java applet。 The applet function will send a get request to read a page from third party server. applet函数将发送一个get请求,以从第三方服务器读取页面。 Now I want page read from applet function to be sent to PHP script. 现在,我希望将从applet函数读取的页面发送到PHP脚本。 To simply put ,i want the return value of the applet request function in a PHP variable. 简单地说,我想把applet请求函数的返回值放在一个PHP变量中。 Is it possible to do? 有可能吗?

I want to do this way because I already have the code to parse the page information in PHP, so I don't want to rewrite that in java again. 我想这样做,因为我已经有代码来解析PHP中的页面信息,所以我不想再次用Java重写它。

I wanted the Java applet because the request has to be sent using the client information like IP. 我想要Java applet,因为必须使用IP等客户端信息来发送请求。 So I don't want to use proxies. 所以我不想使用代理。

Note: I am not trying to hack anyone's server. 注意:我不是要破解任何人的服务器。 I am not a advanced programmer of either Java or PHP. 我不是Java或PHP的高级程序员。 Please reply me in a descriptive manner possibly with pseudo code. 请以描述性方式(可能包含伪代码)回复我。

I already have the code to parse the page information in PHP, so I don't want to rewrite that in java again. 我已经有代码来解析PHP中的页面信息,所以我不想再次用Java重写它。

PHP should be able to get that page more easily than can a Java applet. PHP应该比Java applet更容易获得该页面。 The applet would need to be trusted or in communication with a site that uses the 'cross-domain resources' file that explicitly allows hot-linking. 小程序将需要被信任或与使用“跨域资源”文件的站点进行通信,该文件明确允许进行热链接。

Searches on 'php proxie' seemed to spill out around 7.32 million hits. “ php proxie”的搜索量大约有732万次点击。 I'd start there. 我从那里开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM