You want the functionality of tail(1) in a php function.
Bellow is a php function that gives you the last N lines from a file. It doesn't do everything tail(1) does ( like following, retrying, etc ) but just the basic stuff:
- span style="color: #ff0000;">'r'"";$ret="""\n"""
It may not be the fastest solution but it works.
Have a better one? Please let me know about it.