Read Specific Line from txt file in php
create file.txt file and read.php
<== read.php start ==>
$myFile = "file.txt";
$lines = file($myFile);//file in to an array
echo $lines[2]; //line 2
<== read.php end ==>
<== file.txt strat== >
file.txt
facebook.com
fonts.googleapis.com
google.com
youtube.com
twitter.com
instagram.com
googletagmanager.com
linkedin.com
fonts.gstatic.com
gmpg.org
ajax.googleapis.com
maps.google.com
youtu.be
support.google.com
wordpress.org
cdnjs.cloudflare.com
play.google.com
plus.google.com
en.wikipedia.org
pinterest.com
docs.google.com
drive.google.com
s.w.org
bit.ly
github.com
goo.gl
secure.gravatar.com
amazon.com
itunes.apple.com
vimeo.com
developers.google.com
policies.google.com
vk.com
accounts.google.com
t.co
medium.com
flickr.com
creativecommons.org
w3.org
reddit.com
code.jquery.com
ec.europa.eu
gstatic.com
google-analytics.com
soundcloud.com
player.vimeo.com
support.apple.com
open.spotify.com
apps.apple.com
microsoft.com
storage.googleapis.com
lh3.googleusercontent.com
sites.google.com
tiktok.com
t.me
forbes.com
slideshare.net
cloudflare.com
nytimes.com
cdn.jsdelivr.net
paypal.com
i0.wp.com
maps.googleapis.com
mail.google.com
tinyurl.com
apple.com
calendar.google.com
theguardian.com
apis.google.com
adobe.com
archive.org
chrome.google.com
meetup.com
forms.gle
etsy.com
support.microsoft.com
<== file.txt end ==>