如何仅在我自己的应用程序上运行我的PHP脚本? PHP,C# [英] How do I run my php script only on my own application? PHP-C#

查看:65
本文介绍了如何仅在我自己的应用程序上运行我的PHP脚本? PHP,C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个PHP脚本(特别是wordpress)的帮助,它只能在我自己的C#编写的应用程序中运行(不能用于其他浏览器,如Chrome,IE和......

如果可以,请指导我。

谢谢

解决方案

请看我对这个问题的评论。我不能确定我明白什么你想要正确;我甚至不能确定你理解它。但是,如果我可以假设你需要一些功能,只需要从你网站上的某个页面发送到PHP页面的请求,你的脚本就可以检查HTTP请求的 referer 并且仅当引用者对应于某个预期的URL时才做一些工作;在其他情况下,它应该显示其他内容,重定向到其他页面等。



请在此处查看HTTP_REFERER: http:// php。 net / manual / en / reserved.variables.server.php [ ^ ]。



-SA

Hi, I need a help for my PHP script (specially wordpress) that only should be able to run in my own application written by C# (Not with other browsers like Chrome, IE &....
Guide me if you can.
Thanks

解决方案

Please see my comment to the question. I cannot be sure I understand what you want correctly; and I cannot be even sure that you understand it. However, if I can make an assumption that you need some functionality only of the request to a PHP page is sent from a certain page on your site, your script can check up the referer of the HTTP request and do some job only if the referer corresponds to some expected URL; in other cases, it should show something else, redirect to other page, etc.

Please see 'HTTP_REFERER' here: http://php.net/manual/en/reserved.variables.server.php[^].

—SA


这篇关于如何仅在我自己的应用程序上运行我的PHP脚本? PHP,C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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