Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9018397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:31:01+00:00 2026-06-16T04:31:01+00:00

I get a user.txt file. There are all the users saved in this format:

  • 0

I get a user.txt file. There are all the users saved in this format:

Vorname: Michael | Nachname : Schmidt | Username: DarkDecipio | Passwort: 3609e297fb0b6fb1105cba71d5c024b3
Vorname: John | Nachname : Doe | Username: Dummy | Passwort: d78c03d72e72b44a131d255aec3c8a11

Now when a new User send a register form to the php file, i want to look, if the username is already taken.
So i must search all Username’s, if there the sended username. But i can’t do it with strstr() or something like that, because the Prename (Vorname) or Surname (Nachname) can be the same like the Username. Or the username can include a part of the sended username…

Hope you understand it.
Note: I know it’s a ugly solution to save users in a text file, but this is a project in my school and we MUST use textfiles…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:31:02+00:00Added an answer on June 16, 2026 at 4:31 am

    Off the top of my head, I can think of two options. Assume $line is the current line in your file and you are looking for ‘DarkDecipio’:

    First, use regular expressions to ensure you are picking up the section you want:

    if ( preg_match('/Username:\s*DarkDecipio/', $line) ) {
        echo 'Match';
    }
    

    Second, split the lines by | and then use strstr on the third item in each array:

    $items = explode('|', $line);
    if ( strstr($items[2], 'DarkDecipio') ) {
        echo 'Match';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to get user roles from Membership provider? Suppose I have a username and
is there a way to get user input like an inputbox in c#? i
hi I am trying to get user profile information like this once the authentication
I have an html document that I saved as a .txt file. I want
When a user upload a file(users can upload multiple files) exec('nohup php /main/apache2/work/upload/run.php &');
I know there are hundreds of questions about this, but I need to get
There is a file lets say List.txt and it contains the information of files
First of all, I have following directory structure: /project_directory/rewriting_experimentation_directory htaccess File realfile.txt What I
I am using XMLHttpRequest responseText to GET a server txt file and load the
I get user input including non-ASCII characters and non-printable characters, such as \xc2d \xa0

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.