it still works for me and always has. but i dont use it to afk train i just use it to stay logged in while i go get snacks or use the bathroom. i open a stat screen so i wont get any randoms, then stick my uparrow key with a wad of folded paper (up/down work just like left/right do). when i come back and close the stat screen i almost always get a random immediately, because they basically wait for you to finish what you were doing (reading stats info, banking etc)
i dont do this for hours though because you do get logged out EVENTUALLY. i tried it overnight once just to see what would happen and when i woke up it was on the page when you first login ("you last logged in from your-ip, you have no messages, click here to play"). so it didnt log me out fully, it was like i had just entered my password.