I have a text file with some URLs like:
http://1.com
http://2.com
http://3.com
http://n.com
I need to open that file and run a code for each line in this file, in other words, run the code for every URL listed. By now the code is working perfectly when I have a single URL in an array.. but if I could do this using this file full of URLs together, that would be so much faster
I was trying something like:
$file1 = "/file.txt";
$lines = file($file1);
foreach($lines as $line_num => $v)
{
// my code
}
and running the code using the $v array.. but that's not working because all the lines are inside the $v array all together.. So, how can I run my code for every URL in the file?