Need some help with PHP

Status
This thread has been locked.

Trany

Banned
Feedback score
0
Posts
15
Reactions
15
Resources
0
Hey i was wondering how i could make something like this work

I have a pastebin with stuff in it EXAMPLE user:lastlogin.

On my website i was wondering how i could make it that if there was a search bar. You can search for a USER and it will display there User - Lastlogin if it finds it in the pastebin.

* Thanks in advance
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Wvisoecj

Supreme
Feedback score
9
Posts
471
Reactions
677
Resources
0
You want to build search functionality?

If you want realtime search, I recommend setting up an elastic server.
Otherwise, your search would require a page refresh to see results.
ElasticSearch is for text searching NoSQL, that would be overkill.

For text searching just open a file handler, loop through till you find the username. Once your file starts growing swapping to SQL database will be more efficient.
 

Lehend

A pirate's life for me
Premium
Feedback score
14
Posts
353
Reactions
37
Resources
0
<input type="text" name="q" value="Enter the username you're looking for"/>
to
<input type="text" name="q" placeholder="Enter the username you're looking for"/>[DOUBLEPOST=1499107021][/DOUBLEPOST]
Hey its not working, but thanks. Is it possible i could add you on skype and you could help me?

did u Replace the [MYTEXTFILE] with your txt file to be downloaded and then search away![DOUBLEPOST=1499107156][/DOUBLEPOST]
Here, try this: https://github.com/54321tomo/DownloadTextAndRead

Just put it together so I don't know if it works. :)
man I don't get it...
grabTheTextFile("[MYTEXTFILEURL]") and the method grabTheTextFile() is not asking for a String...
 
Last edited:
Status
This thread has been locked.
Top