Making a website like pingdom.How pingdom programed?
===

I am a php programmer. I want too write a class that can calculate a website times:


    Lookup DNS
    Connect
    Send the request
    Wait for response
    Receive response
    loading time

exactly what pingdom does.
how can i make a website like pingdom? what is php functions that can do this for me.
how can I calculate this time?
thanks.
