Could someone help me with this problem: have a bot on shell on one server, which make log file (log.txt) and I want to open that file on a specific page on my site which is on other server. I’ve tried to use following code (fopen) in .php file:
<?php
$file = fopen(‘
while(!feof($file))
{
echo fgets($file). “<br />”;
}
fclose($file);
?>
but I always get message:
Warning: fopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/user/public_html/index.php on line 2
Warning: fopen([url]http://shell-sample.com/user/archiva/url.txt):
Unable to open file!
Don’t know what is the problem, is that right command and is it written right? or is there any other way (code) I could do same – open that file.