i mean converting chess moves like e1-g1 to PGN format of O-O(castling).

i'd searched many hours but all i got were PGN parser and draw the borad. this is not what i am looking for.

what i really mean is a PHP function/class to convert for example "white knight move" -- "B1C3" into PGN format "Nc3"

thank you!!