Listen, that's been done before, and it can get you kicked from servers if you actually managed to pull it off.
Remember the anti-funky shirt(rainbow shirt or whatever it was)?
That checks how many times you have sent a request to the server for your avatar to be changed.
If it's sent too many times, you get kicked.
Also, this belongs in the coding section of the forums