我正在尝试从我的Adobe Media服务器获取数据。例如,当我用浏览器导航到这个URL:
http://misite.com: 1111/admin/getLiveStreamStats ?用户= myuname& apswd = mypwd& appInst = live&流=阶跃恢复二极管
misite.com
应为localhost
。我得到浏览器中显示的内容。现在我要把这些内容放到php文件中:
$url = 'http://misite.com:1111/admin/ping?auser=myuname&apswd=mypwd';
$contents = file_get_contents($url);
echo $contents;
//OR:
print($contents)
但这只给了我一个空白页。我已经检查了我的源代码,它返回空。我该怎么办?
有什么建议吗?
$url = 'http://misite.com:1111/admin/ping?auser=myuname&apswd=mypwd';
$contents = file_get_contents($url);
echo $contents;
没有文件可引用。注意ping不是ping.php
$url = 'http://example.com/somephpscript.php?auser=myuname&apswd=mypwd';
$contents = file_get_contents($url);
echo $contents;