I'm working on a website, that, when visited, will list the users IP and a GET command (which is their username) and save it to a text file.
Then when another page is visited, will use another GET funtion, then go through the text file, line by line, and find a match between their GET username and a line of the file. This page will then send every other name and IP to another file, wipe the first one, then cop the contents of the second in the first, thus deleting that GET and thier IP.
The first part works, but the second part (not fished) doen't.
So far the second file consits of this:
the usernames /names in this file are edited
but when viited brings up :
(GETvalue's were edited, on the file they show the atual values)
ppl2 is the second username file
I will try and get some example on the web for you to see for yourselves soon
Then when another page is visited, will use another GET funtion, then go through the text file, line by line, and find a match between their GET username and a line of the file. This page will then send every other name and IP to another file, wipe the first one, then cop the contents of the second in the first, thus deleting that GET and thier IP.
The first part works, but the second part (not fished) doen't.
So far the second file consits of this:
Code:
<?PHP
$myFile = "pplonline.txt";
$brbr = "<br>";
$fh = fopen($myFile, 'r');
$myusr = $_GET['usr'];
echo $myusr;
echo "<BR>";
for ( $counter = 1; $counter <=25; $counter +=1){
$ip = fgets($fh);
$usr = fgets($fh);
echo $usr;
if ( $usr == "USEr" ) {
echo "Your user";
} else {
echo "NOT print to ppl2";
}
echo "<BR>";
}
fclose($fh);
but when viited brings up :
Code:
morgs
GETvalue1 NOT print to ppl2
GETvalue2 NOT print to ppl2
GETvalue3 NOT print to ppl2
GETvalue4 NOT print to ppl2
NOT print to ppl2
etc. etc.
ppl2 is the second username file
I will try and get some example on the web for you to see for yourselves soon