Make sure you wrap your code in [php][/php] or [code][/code] tags. Also, a more suitable subject title would be better.
So what is the actual problem you are having? What algorithm do you intend to use for the calculations?
header('HTTP/1.1 420 Enhance Your Calm');