http://www.wechall.net/challenge/noother/stop_us/index.php
在购买过程中,首先domain数加1,然后再扣钱。如果运行到加完domain扣钱之前,那么就可以不花钱了
在文件开始处我们看到配置ignore_user_abort
是false
,所以我们就利用这点
在网上查了下其实connection abort还是比较复杂的,
php cannot detect that the client has aborted the connection until an attempt is made to send information to the client. If your long running script does not issue a flush() the script may keep on running even though the user has closed the connection
幸运的是输出信息的函数就调用了flush()
另一方面,
Complicating things is even if you do issue periodic calls to flush(), having output buffering on will cause those calls to trap and won’t send them down to the client until the script completes anyway!
所以我们在文件开始处的配置里看到buffering被禁止了
综上,我们在运行到刚买完domain扣钱之前,停止页面