I am running Apache 2.2 on Windows with PHP 5.1.1. I am trying to show lines of a file based on the beginning part of the line, and the user's IP. For example if a user's IP is 192.168.1.1 and the log contains [code]<?php // DO NOT DELETE THIS include 'phpsimplechoose_config.php'; //Below is where the verification takes place. Try to play around with it. if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm="Please enter User/Password"'); header('HTTP/1.0 401 Unauthorized'); die; } else { if (($_SERVER['PHP_AUTH_USER'] !== $phpsc_username) || ($_SERVER['PHP_AUTH_PW'] !== $phpsc_password)) { header('WWW-Authenticate: Basic realm="Incorrect! Please try again."'); header('HTTP/1.0 401 Unauthorized'); die; } } // To delete log erase everything after the next line, but not the next line itself (Line 20 and down can be deleted) ?> 192.168.1.1: Fri July 21, 2006 18:47 : Choice 1. test Choice 2. tghsdfg We say... test <br /> 207.144.154.140: Fri July 21, 2006 18:48 : Choice 1. me Choice 2. you We say... you <br /> 207.144.154.140: Fri July 21, 2006 19:00 : Choice 1. you Choice 2. me We say... me <br /> 207.144.154.140: Fri July 21, 2006 19:01 : Choice 1. you Choice 2. me Choice 3. thee We say... me <br /> 207.144.154.140: Fri July 21, 2006 19:03 : Choice 1. you Choice 2. me Choice 3. thee We say... thee <br /> 192.168.1.1: Fri July 21, 2006 19:26 : Choice 1. fsgdf Choice 2. gdfgsdf We say... gdfgsdf <br /> 192.168.1.1: Fri July 21, 2006 19:26 : Choice 1. fghdfgh Choice 2. fghfdgh We say... fghfdgh <br />[/code] I want the script to display all the lines that start with the user's IP. The beginning is just security for the file, I hope that won't mess it up. Thanks