samedi 14 mai 2016

How to create a php script that echo'es from txt document

I am not really a coder... and I have search around about this small script...

However, I only found a script that will echo the entire content of a file and not by line.

Can you guys help me write a small script that will echo or print out

a random line from a text file (by url - http://ift.tt/1ZRfQtT)

the myfile.txt will have thousands of lines ie:

random-text here 1
random-text here 2
random-text here 3
random-text here 4
random-text here 5

I only want to randomly echo a line... for example: only echo

random-text here 4

Thank you so much in advance!




Aucun commentaire:

Enregistrer un commentaire