Created
April 20, 2017 13:19
-
-
Save Hexodus/9f8c1e49ff289f014aa48dc7048488d8 to your computer and use it in GitHub Desktop.
Output text from file line by line on screen. Simple example. From http://stackoverflow.com/questions/43501917/get-content-from-url-in-php/43502087?noredirect=1#comment74062334_43502087
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
$my_URL="http://some-website.com/mydata.txt"; | |
$lines = file($my_URL); | |
foreach ($lines as $line_num => $line) | |
{ | |
echo $line_num." ".$line; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment