Writing Script in PHP to test a website load time.
I am trying to write a script that the user can enter a website and the script will return the load time of the index page with images for the site. does anyone have a sample code
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is very broad question.
Doing this in PHP is probably a non-starter. Web browsers download resources like images, external scripts, css files, etc, in parallel. Getting PHP to do likewise would involve a bunch of ugly process-wrangling, and the results probably wouldn’t necessarily relate to browser behavior anyway.
Consider using existing programs that do this sort of thing – various extensions for popular browsers are a good place to start.