从远程服务器运行PHP [英] Running PHP from a remote server

查看:67
本文介绍了从远程服务器运行PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的ISP为我提供了2台服务器:一台用于普通网络托管

(非PHP)和一台CGI服务器(使用PHP)。我使用

fusion 7创建我的网站,然后将其上传到网络托管服务器。如果

我想运行CGI脚本,我可以使用CGI服务器上的页面外部链接

。但问题是我必须维护两个

网站和所有相关链接。


理想情况下,我希望一切都在一个地方,但我不允许将我的整个网站上传到CGI服务器。
。或者,有一种方法是从非CGI

服务器调用CGI服务器上的PHP脚本,而无需使用可点击的链接。我可以包含HTML这样的

为< A HREF =" http://cgiserver/......> php脚本链接< A>但是这个

要求用户单击某些文本以运行我的脚本。我想

在没有他们点击的情况下从远程服务器运行脚本。

My ISP provides me with 2 servers: one for normal web hosting
(non-PHP) and a CGI server (with PHP). I create my website using
fusion 7 and upload this in its entirity to the web hosting server. If
I want to run CGI scripts, I can do so with an external link to a page
on the CGI server. The problem however is that I have to maintain two
sites and all associated links.

Ideally, I''d like everything to be in one place, but I''m not allowed
to upload my entire site to the CGI server. Alternatively then, is
there a way of calling PHP scripts on the CGI server from a non-CGI
server, without resorting to a clickable link. I can include HTML such
as <A HREF="http://cgiserver/......>php script link<A>, however this
requires the user to click on some text to run my script. I''d like to
run the script from the remote server without them clicking.

推荐答案



Troy写道(部分):

Troy wrote (in part):

理想情况下,我希望一切都在一个地方,但我不允许上传我的整个网站到CGI服务器。或者,有一种方法可以从非CGI服务器上调用CGI服务器上的PHP脚本,而无需使用可点击的链接。我可以包含HTML这样的
< A HREF =" http://cgiserver/......> php脚本链接< A>但是这个
要求用户点击一些文本来运行我的脚本。我想在没有他们点击的情况下从远程服务器运行脚本。

Ideally, I''d like everything to be in one place, but I''m not allowed
to upload my entire site to the CGI server. Alternatively then, is
there a way of calling PHP scripts on the CGI server from a non-CGI
server, without resorting to a clickable link. I can include HTML such
as <A HREF="http://cgiserver/......>php script link<A>, however this
requires the user to click on some text to run my script. I''d like to
run the script from the remote server without them clicking.




从ISP获取代码到真正的托管站点。这是没办法

来做主持。






Get your code off of your ISP onto a real hosting site. That is no way
to do hosting.

Ken


Ken,


你可能是对的....我只是在尝试学习

关于所有这些服务器端脚本的时候那一刻,并不确定

什么是最佳实践 - 所以不要对我的

选择''好'的能力过于自信'主持人。我是否正确地说我的

ISP的做法是单独的网络& CGI服务器是不正常的,因为它是一个痛苦的但是必须将cgi和非cgi页面分开?


特洛伊。

2005年8月31日06:37:09 -0700,肯罗宾逊 < ke ****** @ rbnsn.com>

写道:
Ken,

You''re probably right....I''m just at the outset of trying to learn
about all this server side scripting at the moment, and not to sure
what is and isn''t best practice - so don''t feel too confident about my
ability to choose a ''good'' host. Would I be right in saying that my
ISP''s practice of separate web & CGI servers isn''t normal, ''cos it''s a
pain in the but having to separate out the cgi and non-cgi pages?

Troy.
On 31 Aug 2005 06:37:09 -0700, "Ken Robinson" <ke******@rbnsn.com>
wrote:

Troy写道(部分):

Troy wrote (in part):

理想情况下,我希望一切都在一个地方,但我不允许将我的整个网站上传到CGI服务器。或者,有一种方法可以从非CGI服务器上调用CGI服务器上的PHP脚本,而无需使用可点击的链接。我可以包含HTML这样的
< A HREF =" http://cgiserver/......> php脚本链接< A>但是这个
要求用户点击一些文本来运行我的脚本。我想在没有他们点击的情况下从远程服务器运行脚本。

Ideally, I''d like everything to be in one place, but I''m not allowed
to upload my entire site to the CGI server. Alternatively then, is
there a way of calling PHP scripts on the CGI server from a non-CGI
server, without resorting to a clickable link. I can include HTML such
as <A HREF="http://cgiserver/......>php script link<A>, however this
requires the user to click on some text to run my script. I''d like to
run the script from the remote server without them clicking.



将您的ISP代码从真正的托管站点上移除。这无法主持。

Ken



Get your code off of your ISP onto a real hosting site. That is no way
to do hosting.

Ken



" Troy" < TR ** @ nospam.com> kirjoitti

viestiss?:gk ******************************** @ 4ax.c om ...
"Troy" <tr**@nospam.com> kirjoitti
viestiss?:gk********************************@4ax.c om...
我的ISP为我提供了2台服务器:一台用于普通网络托管(非PHP)和一台CGI服务器(使用PHP)。我使用
fusion 7创建我的网站,并将其完整地上传到网络托管服务器。如果我想运行CGI脚本,我可以通过CGI服务器上的页面外部链接来完成。然而问题是我必须维护两个
站点和所有相关链接。

理想情况下,我希望一切都在一个地方,但我不允许
将我的整个站点上传到CGI服务器。或者,有一种方法可以从非CGI服务器上调用CGI服务器上的PHP脚本,而无需使用可点击的链接。我可以包含HTML这样的
< A HREF =" http://cgiserver/......> php脚本链接< A>但是这个
要求用户点击一些文本来运行我的脚本。我想在没有他们点击的情况下从远程服务器运行脚本。
My ISP provides me with 2 servers: one for normal web hosting
(non-PHP) and a CGI server (with PHP). I create my website using
fusion 7 and upload this in its entirity to the web hosting server. If
I want to run CGI scripts, I can do so with an external link to a page
on the CGI server. The problem however is that I have to maintain two
sites and all associated links.

Ideally, I''d like everything to be in one place, but I''m not allowed
to upload my entire site to the CGI server. Alternatively then, is
there a way of calling PHP scripts on the CGI server from a non-CGI
server, without resorting to a clickable link. I can include HTML such
as <A HREF="http://cgiserver/......>php script link<A>, however this
requires the user to click on some text to run my script. I''d like to
run the script from the remote server without them clicking.




怎么样

< script type =" text / javascript"

src =" http://www.urltotheother.site/cgi/mythingy.php">< / script>

或者将其称为图像的src。


< img src =" http://www.urltotheother.site/cgi/mythingy.php" ;

style =" display:none;">


或另一个:将其设为iframe。

< iframe src =" http://www.urltotheother.site/cgi/mythingy.php"

style =" display:none;">< / iframe>


这会欺骗浏览器认为它需要从

其他网站获取一些内容。因此,我们成功地伪装了一个脚本,作为一个

图像或一个脚本或另一个页面运行。


恕我直言,iframe解决方案将是最好的因为这甚至都不会愚弄

浏览器。你可以肯定的是,在这种情况下内容并不存在...

如果我是你,我会使用iframe。只需将它设置得足够小,就像在像素上一样宽和高,用css以各种可能的方式隐藏它,就是这样!它每次都会获取
但对用户来说是不可见的...


-

SETI @ Home - 捐赠你的cpu'科学的空闲时间。

进一步阅读< http://setiweb.ssl.berkeley.edu/>

Kimmo Laine< et * ***************@5P4Mgmail.com>



how about
<script type="text/javascript"
src="http://www.urltotheother.site/cgi/mythingy.php"></script>

or alternatively call it as a src for an image.

<img src="http://www.urltotheother.site/cgi/mythingy.php"
style="display:none;">

Or yet another one: make it an iframe.

<iframe src="http://www.urltotheother.site/cgi/mythingy.php"
style="display:none;"></iframe>

That''ll fool the browser to think it needs to fetch some content from the
other site. Thus we have successfully disguised a script to be run as an
image or a script or just another page.

IMHO, the iframe solution would be the best, cos that''s not even fooling the
browser. And you can be quite sure that content isn''t cahced in that case...
If I were you, I''d use the iframe. Just make it small enough, like on pixel
wide and heigh, hide it in every possible way using css, and that''s it! It
gets fetched every time but is invisible to the user...

--
SETI @ Home - Donate your cpu''s idle time to science.
Further reading at <http://setiweb.ssl.berkeley.edu/>
Kimmo Laine <et****************@5P4Mgmail.com>


这篇关于从远程服务器运行PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆