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