I'm trying to obtain data from my Adobe Media server. For instance when I navigate with my browser to this URL:
http://misite.com:1111/admin/getLiveStreamStats?auser=myuname&apswd=mypwd&appInst=live&stream=srd
misite.com
should be localhost
. I get the contents shown in my browser. Now I'm trying to get those contents inside my php file:
$url = 'http://misite.com:1111/admin/ping?auser=myuname&apswd=mypwd';
$contents = file_get_contents($url);
echo $contents;
//OR:
print($contents)
But this gives me only a blank page. I've checked my source code and it returns empty. What should I do?
Any suggestions?
$url = 'http://misite.com:1111/admin/ping?auser=myuname&apswd=mypwd';
$contents = file_get_contents($url);
echo $contents;
This has no file to refer to. Notice ping is not ping.php
$url = 'http://example.com/somephpscript.php?auser=myuname&apswd=mypwd';
$contents = file_get_contents($url);
echo $contents;