在另一台服务器(apache)上的某个PHP文件中执行某个函数并获取返回值


execute some function in some php file on another server(apache) and get the returned value

我想访问在另一个服务器上的一些php文件中编写的一些函数并接收输入,我可以访问这些服务器文件,以便我可以更改它们以进行适当的配置,我有所有权限这样做,谁能指导我怎么做,谢谢

$result = file_get_contents("http://some.server/out.php");

和out.php

<?php
include 'some.php';
function();

我认为您可以实现web服务或api,输出可以是xml或json读取内容并在您的网站上使用。

这只是Facebook图形API使用URLhttps://graph.facebook.com/Pepsi

以上链接将获取百事可乐Facebook页面信息