Jump to content

prattmic

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Everything posted by prattmic

  1. No they don't need to login.  Did you see my edit?
  2. So then I don't even need iplog, I can just change the value to phpsimplechoose_log? EDIT:  It works now! thank you!  Is it possible to take out the line number and IP from what it shows though?  It isn't extremely important, but it would be nice.
  3. No it doesn't work with 192.168.1.1. iplog.php contains a list of the all the IPs. It currently contains: [code]192.168.1.1 192.168.1.1 80.144.16.124 80.144.16.124 [/code] phpsimplechoose_log.php is the IPs and the content, it 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: Sat July 22, 2006 12:55 : Choice 1.  dfghf  Choice 2.  ghdfgh  We say... ghdfgh <br /> 192.168.1.1: Sat July 22, 2006 13:39 : Choice 1.  gsdfg  Choice 2.  sdfgdfg  We say... gsdfg <br /> 80.144.16.124: Sat July 22, 2006 13:56 : Choice 1.  me  Choice 2.  him  Choice 3.  she  Choice 4.  it  Choice 5.  who  We say... it <br /> 80.144.16.124: Sat July 22, 2006 13:57 : Choice 1.  good  Choice 2.  bad  Choice 3.  evil  Choice 4.  ugly  Choice 5.  world  We say... bad <br />[/code]
  4. Nope, still get no results.  :-\ Also, I have not spaces in front of each IP.  Don't you need a reference somewhere to phpsimplechoose_log.php (the main log).  I tried putting it as $log everytimes, but still never got results.
  5. with that as the entire script I get nothing
  6. I get an array of the IPs in the log phpinfo() = http://prattmic.homedns.org/xampp/phpinfo.php
  7. Safe mode is off, and I get the same result with the new code
  8. My files always have the right permissions, its Windows.  And the iplog.php is in the same directory. P.S.  I don't actually need the security for this script, the security was for the other log.
  9. Is it possible to use [code]$_SERVER['REMOTE_ADDR'][/code] for the IP to look for? Also, that code shows the line of the lines of the log right? EDIT: With and without the header I am getting: No matches found for IP 192.168.1.1
  10. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.