Making a website like pingdom - how is it programmed?

1.3k views Asked by At

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

How can I make a website like Pingdom? What PHP functions can do this for me?

2

There are 2 answers

4
Ben Lefebvre On

I suggest you read the documentation about their API on their website. Don't know if you already read it but hey here's the link

There's some php examples that might be interesting to you.

There is some question that has been asked here on stackoverflow i'll list some of them :

https://stackoverflow.com/questions/9957389/creating-a-website-monitoring-system-like-pingdom-wormly

https://stackoverflow.com/questions/9439669/making-a-website-like-pingdom

Hope this helps you!

0
Jan de Bruin On

You can do a dns lookup with gethostbyaddr, create a connection with fsockopen, write the HTTP request, wait for the response etc. You can calculate the time after each step.

We at www.downnotifier.com use similar ways.