I am working on Youtube apis but each query is taking much longer than expected. While same query on my iPage hosting account is taking 10 times lesser time.
Here is the script::
<?php include ‘curl.php’; $time_start = microtime(true); $data=curlGet(‘https://gdata.youtube.com/feeds/api/standardfeeds/most_popular?alt=json&format=5&time=today&max-results=5’);
$time_end = microtime(true); $time = $time_end - $time_start;
echo “Did nothing in $time seconds\n”;
It takes 1.7 seconds on average at digitalocean droplet, while for my iPage account it takes just 0.15 seconds on average.
I have tried file_get_contents() too and it takes same amount of time.
Please help me in this regards.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.