Jump to content

searching record fields in text files


leeharvey09

Recommended Posts

function search_password(){
$file = "username_passwords_record.txt"; 
$record_rows = file($file); //file — Reads entire file into an array
foreach ($record_rows as $value) {
$explode_values = explode(",",$value);
echo $explode_values[0] .  $explode_values[1] . $explode_values[2] . $explode_values[3]. $explode_values[4] . "<br/>";
}
}
search_password();

 

i have a text file to store some records with

 

Fields: Ip,date,email,username,encrypted password

 

test values in text file : username_passwords_record.txt

 

127.0.0.1,08.03.10,no-reply@google.com,Google Analytics,MjJvbWxramhpZ24yOGRiZWZhYzg5

127.0.0.1,08.03.10,store-news@amazon.com,Amazon store,MjVvbmhtaWdqa2wzMGNmZGJlYTI5

127.0.0.1,06.03.10,niketown@yahoo.com,kill hill,MzdsbWluZ29qaGs2M2NhZGJlZjYz

127.0.0.1,08.03.10,simon@robertlane.com.au,Simon Hutton ,NDZrbGdtaGppbm82NWRmYWNlYjUy

127.0.0.1,08.03.10,used-support@carsales.com.au,carsales,NDNpa2xubW9namg1NGFiZmRjZTY2

 

i wanna be able to scan and compare any of these fields, with the value the user has entered, to check if they match...

any help would be great thanks

 

Lee Harvey

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.