I am trying to read an external file, hosted on another server, but am having issues.
Here, I identify the variables:
$variable1 = "test";
$variable2 = "testing";
Here, I identify the URL to read:
$url = "http://test.com/page.php?v1=" . $variable1 . "&v2=" . $variable2;
Here, I read the external file:
$content = file($url);
$reading = $content[0];
echo $reading;
The odd thing is nothing comes out. I have tried entering the actual URL and it does work, however, when PHP tries to do it, it comes out blank.
I know it is not a fatal error as I tried just putting some regular text in there. So,there is something wrong that just is not reading the file correctly. Furthermore, I did make sure the reading server is no blocked by the server with the file on it.
Any suggestions would be appreciated.