I am using this code to write a line from a file to a page. It works when I write the php like this:
<?php
$f_contents = file("something.txt");
$line = $f_contents[array_rand($f_contents)];
$data = $line;
echo "$data";
?>
But not like this:
<?php
$f_contents = file("http://something.com/something.txt");
$line = $f_contents[array_rand($f_contents)];
$data = $line;
echo "$data";
?>
Why isn't it working, and how can I fix it?