php - how to get the server's execution time via curl -


for example, request www.domain.com via curl in php

$curl = curl_init('http://www.domain.com'); curl_exec($curl);  var_dump(curl_getinfo($curl)); 

i can 'total_time', 'starttransfer_time', 'connect_time',etc. can't server's execution time (sometime, curl request takes lot time, wasted in transfer). possible or missed parameters?

that's not possible. there no way curl know how time spend server processing request, , how lost due transfer.

if need information try including on page requesting through curl , parsing out. example, add little message footer of page says page generated in xx.yyyy seconds. or cleaner, add custom http header contains execution time. read header on curl side.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -