Created
January 16, 2013 10:12
-
-
Save n8kowald/4546101 to your computer and use it in GitHub Desktop.
Investigate slowness with PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ch = curl_init('http://path/to/sanfrancisco/'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
$output = curl_exec($ch); | |
$info = curl_getinfo($ch); | |
$info will return an array including elements for | |
total_time, | |
namelookup_time, | |
connect_time, | |
pretransfer_time, | |
starttransfer_time and | |
redirect_time. | |
From these you should be able to work out whether it's the dns, request, the actual soap server or the response that's taking up the time. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment