如何从另一个网站抓取代码(我控制的)? [英] How to grab code from another website (that I control)?

查看:134
本文介绍了如何从另一个网站抓取代码(我控制的)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的网站中输入一行php,并让它回显将要在我的网站上输入的代码。本质上,我控制着客户网站的一部分,如果我可以在不需要上传的情况下更改它,那么对所有相关人员都更方便。这一定是一个长期解决的问题,但我找不到解决方案。另外,如果我的代码是服务器端,我不确定这是否可行。想法,帮助,建议?

I want to enter a line of php into my site and have it echo out code that is to be entered on my site. Essentially I am controlling a part of a clients' site and it is more convenient for all involved if I can change it without requiring them to upload it. This must be a long solved issue, but I cannot find a solution. Also, I am not sure if this is possible if my code is server side. Thoughts, help, suggestions?

推荐答案

你应该找出解决这个问题的另一种方法。从我的头顶开始,您可能会编写一个实用程序,允许用户名和密码替换特定的文件。

You should figure out a different approach to fixing this problem. From the top of my head, you could probably write a utility that allows, with a username and password, you to replace specific files.

使用其他站点的代码,甚至如果你控制它,是非常危险的。所有可能的攻击者所要做的就是通过多种手段之一来欺骗地址,并且他们可以在服务器上按字面做任何事情,脚本有权执行该操作。为了完整起见,您正在寻找 eval ,但您想要使用不同的方法。

Using code from another site, even if you control it, is incredibly dangerous. All a would-be attacker has to do is spoof the address through one of many means, and they could literally do anything on the server that the script has privileges to do. For completeness, you are looking for "eval", but you want to use a different approach.

这篇关于如何从另一个网站抓取代码(我控制的)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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