<?php
$file = 'c:/Users/HP/Downloads/climate-system/climate-system/index.php';
$content = file_get_contents($file);
$query = isset($argv[1]) ? $argv[1] : '';
if (!$query) {
    die("No query provided\n");
}
$lines = explode("\n", $content);
$found = 0;
foreach ($lines as $idx => $line) {
    if (stripos($line, $query) !== false) {
        $found++;
        echo "Line " . ($idx + 1) . ": " . trim($line) . "\n";
        if ($found >= 50) {
            echo "Too many matches, truncating...\n";
            break;
        }
    }
}
if ($found == 0) {
    echo "No matches found for '$query'\n";
}
