duan5801 2016-02-18 04:28
浏览 53
已采纳

如何知道在PHP中使用fopen加载网址的时间?

I'm calling fopen like this: fopen($url.urlencode("\"-BENCHMARK(100000000, rand()) -- -"),"r");

But i don't know when the return of the function appends. (i tried to put an echo just after and it executes immediatly...maybe fopen create a subthreads..), any idea ?

Thanks

  • 写回答

3条回答 默认 最新

  • doupin8555 2016-02-18 04:43
    关注

    "how to know when a url is loaded using fopen in php?" -- most probably, fopen() returns as soon as the first data packet of the response is received. You have to fread() (or similar) from the resource returned by fopen() until feof() returns TRUE to find out when the response is complete.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)
编辑
预览

报告相同问题?