Of course an exact replica can be made in PHP. String functions are the most basic in a programming language. You won't accomplish it in 2 lines of code though. Khaled's token identifiers don't just magically figure out what the 1st to 4th tokens are and give them to you. There is likely a lot of math/comparisons/error checks built into the gettok routine in his code. You just have to figure out how to make it yourself. PHP has array functions that will allow you to make all of the token identifiers in mIRC, and it will probably be easier than in mIRC's core language.

http://ca.php.net/manual/en/book.array.php

The bottom line is: YES the token functions can be duplicated in PHP, and NO you probably won't get someone here to do it for you.

-genius_at_work