$file_name = "data.txt";
$file = fopen($file_name, "r");
$count = 0;
while (!feof($file)) {
$line = trim(fgets($file));
$substring = "url:";
if (strpos($line, $substring) != false) {
$count++;
}
}
echo "count: " . $count . "<br>";
/*
run:
count: 13342281
*/